Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from: 'styles/',
to: 'styles/'
}),
{
from: 'chrome-manifest.json',
to: 'chrome/manifest.json',
transform: transformManifest('chrome')
},
{
from: 'firefox-manifest.json',
to: 'firefox/manifest.json',
transform: transformManifest('firefox')
}
], { copyUnmodified: true }),
production && release &&
new BugsnagSourceMapUploaderPlugin({
apiKey: bugsnagApiKey,
appVersion: version,
publicPath: 'togglbutton://',
overwrite: true /* Overwrites existing sourcemaps for this version */
}),
new FileManagerPlugin({
onEnd: [
{
copy: [
{ source: 'dist/scripts/**/*', destination: 'dist/chrome/scripts' },
{ source: 'dist/scripts/**/*', destination: 'dist/firefox/scripts' }
]
},
production && {
delete: [
'dist/**/*.js.map'
function getPlugins(appEnv, env) {
const plugins = [
new webpack.NamedModulesPlugin()
];
if (appEnv.BUGSNAG_API_KEY) {
plugins.push(new BugsnagSourceMapUploaderPlugin({
apiKey: appEnv.BUGSNAG_API_KEY,
publicPath: appEnv.PUBLIC_ASSET_PATH,
releaseStage: appEnv.ENVIRONMENT,
appVersion: appEnv.SHIP_CLUSTER_BUILD_VERSION,
overwrite: true
}));
}
if (env !== "enterprise") {
plugins.push(
new CopyWebpackPlugin([
{
from: "./src/services/prodPerfect.js",
transform: function (content) {
var contentS = content.toString("utf8");
contentS = contentS.replace("@@PROD_PERFECT_WRITE_KEY", appEnv.PROD_PERFECT_WRITE_KEY);
function getPlugins(appEnv, env) {
const plugins = [
new webpack.NamedModulesPlugin()
];
if (appEnv.BUGSNAG_API_KEY) {
plugins.push(new BugsnagSourceMapUploaderPlugin({
apiKey: appEnv.BUGSNAG_API_KEY,
publicPath: appEnv.PUBLIC_ASSET_PATH,
releaseStage: appEnv.ENVIRONMENT,
appVersion: appEnv.KOTSADM_BUILD_VERSION,
overwrite: true
}));
}
return plugins;
}