Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ifElse(minimize)(
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false,
},
mangle: {
screw_ie8: true,
},
output: {
comments: false,
screw_ie8: true,
},
}),
),
ifElse(env === 'production')(new LodashModuleReplacementPlugin()),
]),
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolvePath(appRootDir.get(), './src')],
},
],
},
}
}
}
export default [
{
...config,
output: {
filename: 'react-leaflet.js',
library: 'ReactLeaflet',
libraryTarget: 'umd',
path: outputPath,
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
}),
new LodashModuleReplacementPlugin(lodashFeatures),
],
},
{
...config,
output: {
filename: 'react-leaflet.min.js',
library: 'ReactLeaflet',
libraryTarget: 'umd',
path: outputPath,
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
new LodashModuleReplacementPlugin(lodashFeatures),
new webpack.optimize.UglifyJsPlugin({
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false,
},
compressor: {
pure_getters: true,
unsafe: true,
unsafe_comps: true,
screw_ie8: true,
warnings: false,
},
})
);
config.plugins.push(
new LodashModuleReplacementPlugin()
);
}
if (generateStats) {
config.plugins.push(
new WebpackStatsPlugin('stats.json', {
chunkModules: true,
exclude: [/node_modules[\\\/]react/],
})
);
}
export default config;
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false,
},
compressor: {
pure_getters: true,
unsafe: true,
unsafe_comps: true,
screw_ie8: true,
warnings: false,
},
})
);
config.plugins.push(
new LodashModuleReplacementPlugin()
);
}
if (generateStats) {
config.plugins.push(
new WebpackStatsPlugin('stats.json', {
chunkModules: true,
exclude: [/node_modules[\\\/]react/],
})
);
}
export default config;
options: {
search: '__TEST__',
replace: '""'
}
},
{
test: /\.(js|jsx)$/,
include: [
`${path.resolve(settings.src.baseDir)}`
],
loader: 'babel-loader'
}
]
},
plugins: [
new LodashModuleReplacementPlugin({
collections: true
}),
new webpack.DefinePlugin(definitions),
new webpack.NormalModuleReplacementPlugin(
/es6-promise/, require.resolve(es6PromiseMock)
),
new webpack.NormalModuleReplacementPlugin(
/for-each/, require.resolve('lodash/forEach')
),
new webpack.NormalModuleReplacementPlugin(
/is-function/, require.resolve('lodash/isFunction')
),
new webpack.NormalModuleReplacementPlugin(
/lodash.debounce/, require.resolve('lodash/debounce')
),
new webpack.NormalModuleReplacementPlugin(