Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import webpack from 'webpack'
import { Config } from 'webpack-config'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
module.exports = new Config()
.extend({
'./webpack.development.js': function(config) {
delete config.debug
// delete config.devtool
delete config.output.pathinfo
delete config.devServer
delete config.entry.server
delete config.entry.app
delete config.plugins
delete config.entry.vendors
config.entry[process.env.LIBRARY_NAME] = process.env.SRC_ENTRY
return config
}
})
.merge({
var Config = require("webpack-config").Config;
module.exports = new Config().extend("conf/node.es6.config.js").merge({
devtool: "#source-map",
output: {
pathinfo: true
},
watch: true,
devServer: {
stats: {
chunks: false
}
}
});
var Config = require("webpack-config").Config;
module.exports = new Config().extend("conf/web.es5.config.js").merge({
devtool: "#source-map",
output: {
pathinfo: true
},
watch: true,
devServer: {
stats: {
chunks: false
}
}
});
var webpack = require("webpack");
var Config = require("webpack-config").Config;
var CompressionPlugin = require("compression-webpack-plugin");
module.exports = new Config().extend("conf/web.es6.config.js").merge({
devtool: "#source-map",
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.js$|\.css$|\.html$/
})
]
});
var webpack = require('webpack');
var WebpackConfig = require('webpack-config').Config;
var path = require('path');
var BUILD_DIR = path.resolve(__dirname, 'dist');
var APP_DIR = path.resolve(__dirname, 'src/client/app');
var JSNEXT_MAIN = path.resolve(__dirname, require('./package.json')['jsnext:main']);
var config = new WebpackConfig().merge({
//entry: JSNEXT_MAIN.toString(),
output: {
path: BUILD_DIR,
filename: 'stack-es2015-modules.js'
},
devtool: "inline-source-map",
module : {
loaders : [
{
test: /\.(jsx|js)$/,
exclude : [
/node_modules/
],
loader : 'babel-loader'
}
]