Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} ),
FileConfig.loader(),
],
},
resolve: {
extensions: [ '.json', '.js', '.jsx' ],
modules: [ 'node_modules' ],
},
node: false,
plugins: [
new webpack.DefinePlugin( {
'process.env.NODE_ENV': JSON.stringify( process.env.NODE_ENV ),
global: 'window',
} ),
new webpack.IgnorePlugin( /^\.\/locale$/, /moment$/ ),
...SassConfig.plugins( { cssFilename, minify: ! isDevelopment } ),
new DuplicatePackageCheckerPlugin(),
new CopyWebpackPlugin( [
{
from: presetPath,
to: 'index.json',
},
] ),
],
externals: [ wordpressExternals, 'wp', 'lodash' ],
};
return webpackConfig;
}