Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}),
new CssExtractPlugin({
filename: '[name].css',
}),
]
if (mode === 'development') {
plugins.push(
new HardSourcePlugin(),
// new WebExtReloadPlugin({
// port: webExtReloadPort,
// }),
)
} else if (mode === 'production') {
plugins.push(
new SentryPlugin({
release: process.env.npm_package_version,
include: output.path,
dryRun: !shouldPackage,
}),
)
}
// CI build doesn't need to use linting plugins
if (isCI) {
return [...plugins, initTsPlugin(false)]
}
if (notifsEnabled) {
plugins.push(
new BuildNotifPlugin({
title: 'Memex Build',
export default function(config) {
return group([
env('production', [
addPlugins([
isSentryConfigured && new SentryWebpackPlugin({
include: 'src/app',
ignoreFile: '.sentrycliignore',
}),
].filter(Boolean)),
]),
])
}
import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
import path from 'path';
import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import merge from 'webpack-merge';
import baseConfig from './webpack.config.base';
import { version } from "./src/package.json";
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const plugins = [];
if (process.env.SENTRY_AUTH_TOKEN) {
plugins.push(new SentryPlugin({
release: version,
include: ['./src/dist', './src/main.js', './src/main.js.map'],
ignore: ['node_modules', 'webpack.config.js']
}))
}
export default merge(baseConfig, {
mode: 'production',
target: 'electron-renderer',
entry: [path.join(__dirname, 'src', 'renderer', 'index.jsx')],
output: {
path: path.join(__dirname, 'src/dist'),