Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// CI build doesn't need to use linting plugins
if (isCI) {
return [...plugins, initTsPlugin(false)]
}
if (notifsEnabled) {
plugins.push(
new BuildNotifPlugin({
title: 'Memex Build',
}),
)
}
if (shouldPackage) {
plugins.push(
new ZipPlugin({
path: packagePath,
filename: extPackageName,
exclude: [/\.map/],
}),
new PostCompilePlugin(() =>
exec('git archive -o dist/source-code.zip master'),
),
)
}
return [
...plugins,
initTsPlugin(true),
new StylelintPlugin({
files: 'src/**/*.css',
failOnError: mode === 'production',
],
}, {
test: /\.woff$/,
use: [
{ loader: 'file-loader', options: { esModule: false, name: '[name].[ext]' } },
],
}],
},
optimization: {
minimize: false,
concatenateModules: true,
},
plugins: [
new InertEntryPlugin(),
new LodashModuleReplacementPlugin(),
(env.zip && !conf.noZip && new ZipPlugin({
path: path.join('..', 'zip'),
filename: conf.output,
})),
].filter(x => x),
}));