1 |
|
2 |
|
3 |
|
4 | module.exports = function buildConfig(env) {
|
5 | const config = require(`./config/webpack/lib-${env}.js`)({
|
6 | context: __dirname,
|
7 | entry: './src',
|
8 | library: 'topcoder-react-utils',
|
9 | });
|
10 |
|
11 | |
12 |
|
13 | const babelLoader = config.module.rules.find(
|
14 | x => x.loader === 'babel-loader',
|
15 | );
|
16 | babelLoader.options.presets[0] = `${__dirname}/config/babel/webpack`;
|
17 |
|
18 | if (!config.module.noParse) config.module.noParse = [];
|
19 | config.module.noParse.push(/src\/shared\/utils\/webpack\/require/);
|
20 |
|
21 | return config;
|
22 | };
|