(page, entry, init)
| 56 | if (window[INIT_FUNC_NAME] !== 1)`; |
| 57 | |
| 58 | const buildConfig = (page, entry, init) => { |
| 59 | const config = entry ? getBaseConfig() : getPageConfig(); |
| 60 | config.plugins.push(new webpack.DefinePlugin({ |
| 61 | ...defsObj, |
| 62 | // Conditional compilation to remove unsafe and unused stuff from `injected` |
| 63 | 'process.env.IS_INJECTED': JSON.stringify(/injected/.test(page) && page), |
| 64 | })); |
| 65 | if (typeof entry === 'string') { |
| 66 | config.entry = { [page]: entry }; |
| 67 | } |
| 68 | if (!entry) init = page; |
| 69 | if (init) init(config); |
| 70 | return config; |
| 71 | }; |
| 72 | |
| 73 | module.exports = [ |
| 74 | buildConfig((config) => { |
no test coverage detected