Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}),
],
},
plugins: [
new StatsWriterPlugin({ fields: null }),
new ServiceWorkerPlugin(),
new MiniCSSExtractPlugin({
filename: getAssetPath('[name]-[contenthash:16].css'),
}),
new webpack.HashedModuleIdsPlugin(),
new webpack.EnvironmentPlugin(
Object.assign(
{
NODE_ENV: 'production',
},
hopsConfig.envVars
)
),
new webpack.optimize.ModuleConcatenationPlugin(),
],
performance: {
assetFilter: function(assetFilename) {
return assetFilename !== 'stats.json' && !/\.map$/.test(assetFilename);
},
},
};
},
plugins: [
new StatsWriterPlugin({ fields: null }),
new ServiceWorkerPlugin(),
new ExtractTextPlugin({
filename: getAssetPath('[name]-[contenthash:16].css'),
allChunks: true,
ignoreOrder: true,
}),
new webpack.HashedModuleIdsPlugin(),
new webpack.EnvironmentPlugin(
Object.assign(
{
NODE_ENV: 'production',
},
hopsConfig.envVars
)
),
new webpack.optimize.ModuleConcatenationPlugin(),
],
performance: {
assetFilter: function(assetFilename) {
return assetFilename !== 'stats.json' && !/\.map$/.test(assetFilename);
},
},
};
},
context: hopsConfig.appDir,
resolve: require('../sections/resolve')('develop'),
module: {
rules: require('../sections/module-rules')('develop'),
},
plugins: [
new ServiceWorkerPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(),
new webpack.EnvironmentPlugin(
Object.assign(
{
NODE_ENV: 'development',
},
hopsConfig.envVars
)
),
],
performance: {
hints: false,
},
devtool: 'cheap-module-eval-source-map',
watchOptions: {
aggregateTimeout: 300,
ignored: /node_modules/,
},
};
whitelist: shouldIncludeExternalModuleInBundle,
}),
],
module: {
rules: require('../sections/module-rules')('node'),
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
new webpack.EnvironmentPlugin(
Object.assign(
{
NODE_ENV: 'development',
},
hopsConfig.envVars
)
),
],
performance: {
hints: false,
},
devtool: process.env.NODE_ENV !== 'production' && '#inline-source-map',
optimization: {
minimizer: [],
},
};