Commit bb784aa5 authored by Praveen Arimbrathodiyil's avatar Praveen Arimbrathodiyil
Browse files

Build with webpack 4

parent 1e58a014
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ Build-Depends:
 nodejs (>= 6),
 node-webpack-merge,
 pigz,
 webpack,
 webpack (>= 4~),
Standards-Version: 4.3.0
Homepage: https://github.com/digitalbazaar/rdf-canonize
Vcs-Browser: https://salsa.debian.org/js-team/node-rdf-canonize
+36 −0
Original line number Diff line number Diff line
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -75,6 +75,7 @@
 
   // plain unoptimized unminified bundle
   const bundle = webpackMerge(common, {
+    mode: 'development',
     output: {
       path: path.join(__dirname, 'dist'),
       filename: info.filenameBase + '.js',
@@ -91,6 +92,7 @@
 
   // optimized and minified bundle
   const minify = webpackMerge(common, {
+    mode: 'production',
     output: {
       path: path.join(__dirname, 'dist'),
       filename: info.filenameBase + '.min.js',
@@ -98,17 +100,6 @@
       libraryTarget: info.libraryTarget || 'umd'
     },
     devtool: 'cheap-module-source-map',
-    plugins: [
-      new webpack.optimize.UglifyJsPlugin({
-        compress: {
-          warnings: true
-        },
-        output: {
-          comments: false
-        }
-        //beautify: true
-      })
-    ]
   });
   if(info.library === null) {
     delete minify.output.library;
+1 −0
Original line number Diff line number Diff line
2001_babel_downgrade.patch
2002_webpack_shared_modules.patch
2003_webpack4.patch
+3 −0
Original line number Diff line number Diff line
@@ -19,3 +19,6 @@ override_dh_auto_build:
# TODO: Enable testsuite when normalization spec is in Debian
override_dh_auto_test:
#	mocha -R spec --check-leaks test/ conformance-test.js
override_dh_auto_clean:
	rm -rf node_modules/.cache
	dh_auto_clean