Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 12 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* eslint-disable security/detect-non-literal-require */ |
||
2 | import path from 'path'; |
||
3 | |||
4 | const isBuild = process.env.BUILD && [ '1', 'true' ].includes(process.env.BUILD); |
||
5 | const entry = process.env.ENTRY && path.resolve(process.env.ENTRY) |
||
6 | || isBuild && path.resolve(__dirname, '../lib') |
||
7 | || path.resolve(__dirname, '../src'); |
||
8 | |||
9 | module.exports = require(entry); |
||
10 | |||
11 | export function _load(relPath) { |
||
12 | return require(path.join(entry, relPath)); |
||
13 | } |
||
14 |