1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
Description: webpack.config.js in incompatible with webpack4 API, Hence did the needed changes
Author: Nilesh Patra <nilesh@debian.org>
Pirate Praveen
Last-Update: 2022-05-24 12:51:11 +0530
Bug-Debian: https://bugs.debian.org/1011446
--- a/q2_demux/_summarize/assets/webpack.config.js
+++ b/q2_demux/_summarize/assets/webpack.config.js
@@ -8,19 +8,20 @@
var path = require('path');
var webpack = require('webpack');
+const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
+ mode: 'production',
entry: {
app: './src/main.js',
- vendor: ['d3']
},
plugins: [
- new webpack.optimize.CommonsChunkPlugin('vendor', 'dist/vendor.bundle.js'),
- new webpack.optimize.UglifyJsPlugin({
- compress: { warnings: false },
- mangle: { except: ['init'] }
+ new TerserPlugin({
+ terserOptions: {
+ "warnings": false
+ }
}),
- new webpack.NoErrorsPlugin(),
+ new webpack.NoEmitOnErrorsPlugin(),
],
output: {
path: __dirname,
@@ -32,14 +33,19 @@
extensions: ['', '.js']
},
module: {
- loaders: [
+ rules: [
{
- loader: 'babel-loader',
exclude: /node_modules/,
- query: {
- presets: ['es2015']
- }
- }
+ use: [{
+ loader: 'babel-loader',
+ }]
+ }
]
},
+resolve: {
+ modules: ['/usr/lib/nodejs', '/usr/share/nodejs']
+},
+resolveLoader: {
+ modules: ['/usr/lib/nodejs', '/usr/share/nodejs'],
+}
};
|