WME/aufgabe5/node_modules/csvtojson/webpack.config.js

66 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-01-09 11:25:28 +00:00
var webpack = require('webpack')
var path = require('path')
/*
* SplitChunksPlugin is enabled by default and replaced
* deprecated CommonsChunkPlugin. It automatically identifies modules which
* should be splitted of chunk by heuristics using module duplication count and
* module category (i. e. node_modules). And splits the chunks
*
* It is safe to remove "splitChunks" from the generated configuration
* and was added as an educational example.
*
* https://webpack.js.org/plugins/split-chunks-plugin/
*
*/
/*
* We've enabled UglifyJSPlugin for you! This minifies your app
* in order to load faster and run less javascript.
*
* https://github.com/webpack-contrib/uglifyjs-webpack-plugin
*
*/
var UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
module: {
rules: []
},
entry: "./index.js",
output: {
filename: 'browser.js',
path: path.resolve(__dirname, 'browser'),
libraryTarget: "commonjs2"
},
mode: 'production',
plugins: [
new UglifyJSPlugin(),
new webpack.IgnorePlugin(/fs/),
],
optimization: {
splitChunks: {
cacheGroups: {
vendors: {
priority: -10,
test: /[\\/]node_modules[\\/]/
}
},
chunks: 'async',
minChunks: 1,
minSize: 30000,
name: true
}
}
}