Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const options = Object.assign({}, configPart.__mergeStrategy)
delete configPart.__mergeStrategy
separateConfig = mergeWithOptions(options, [mergedConfig], configPart)
} else {
separateConfig = merge(mergedConfig, configPart)
}
if (separateConfig.multiple) delete separateConfig.multiple
configs.push(isDebugMode ? smp.wrap(separateConfig) : separateConfig)
}
delete mergedConfig.multiple
}
// replace the first position placeholder in the list
configs[0] = isDebugMode ? smp.wrap(mergedConfig) : mergedConfig
return merge.multiple(configs)
}
const cli = require('./utils/cli')
// define your stuff
const baseDir = path.join(__dirname, '../')
const buildDir = path.join(baseDir, 'build')
// const apiDir = path.join(process.cwd(), 'build', 'api')
const sslKey = path.join(__dirname, 'ssl', 'localhost.key')
const sslCrt = path.join(__dirname, 'ssl', 'localhost.crt')
const defaultPort = 9000
// define your stuff
const PLUGINS = []
const configs = merge.multiple(common, {
app: {
mode: 'development',
devtool: 'inline-source-map',
plugins: PLUGINS,
},
staticAssets: {},
vendors: {},
pwa: {},
})
/* eslint no-sync: ["error", { allowAtRootLevel: true }]*/
serve({}, {
compiler: webpack(configs),
content: buildDir,
clipboard: true,
'use strict';
const merge = require('webpack-merge');
const common = require('./webpack.base.js');
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = merge.multiple(common, [
{
mode: "none",
output: {
filename: `buttplug.min.js`
},
optimization: {
minimize: false
},
devtool: '#source-map',
plugins: [
new TerserPlugin({
sourceMap: true,
parallel: true,
terserOptions: {
mangle: {
keep_classnames: true,
const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const mode_config = {};
Object.keys(common).forEach(k => {
mode_config[k] = {
mode: "development"
}
});
module.exports = merge.multiple(common, mode_config);
'use strict';
const merge = require('webpack-merge');
const production = require('./webpack.production.js');
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
plugins: [
new BundleAnalyzerPlugin()
]
};
module.exports = merge.multiple(production, [
{
plugins: [
new BundleAnalyzerPlugin()
]
}]);
const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const mode_config = {};
Object.keys(common).forEach(k => {
mode_config[k] = {
mode: "production"
}
});
module.exports = merge.multiple(common, mode_config);