Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
config.plugins.push(
new StyleLintPlugin({
syntax: 'scss',
context: path.join(__dirname, dir),
}),
);
config.plugins.push(
new WebpackNotifierPlugin({
alwaysNotify: true,
emoji: true,
}),
);
config.plugins.push(new PrismLanguageGenerationPlugin());
config.plugins.push(
new DependencyExtractionWebpackPlugin({
outputFormat: 'json',
combineAssets: true,
combinedOutputFile: `wp-assets${isProd(state) ? '.min' : ''}.json`,
}),
);
if (isProd(state)) {
config.plugins[0].opts.fileName = 'asset-manifest.min.json';
config.plugins.push(
new CopyWebpackPlugin([
{
from: 'node_modules/prismjs/components/*.js',
flatten: true,
},
]),
);