Commit c9a9d4ff authored by Jérome Perrin's avatar Jérome Perrin

production build with uglify js

parent fe39b696
...@@ -7060,6 +7060,30 @@ ...@@ -7060,6 +7060,30 @@
} }
} }
}, },
"uglifyjs-webpack-plugin": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz",
"integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==",
"dev": true,
"requires": {
"cacache": "10.0.4",
"find-cache-dir": "1.0.0",
"schema-utils": "0.4.5",
"serialize-javascript": "1.4.0",
"source-map": "0.6.1",
"uglify-es": "3.3.9",
"webpack-sources": "1.1.0",
"worker-farm": "1.6.0"
},
"dependencies": {
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
},
"underscore": { "underscore": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
......
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = { module.exports = {
mode: 'development', mode: 'production',
entry: { entry: {
"app": './index.js', "app": './index.js',
"editor.worker": 'monaco-editor/esm/vs/editor/editor.worker.js', "editor.worker": 'monaco-editor/esm/vs/editor/editor.worker.js',
...@@ -23,6 +24,7 @@ module.exports = { ...@@ -23,6 +24,7 @@ module.exports = {
}] }]
}, },
plugins: [ plugins: [
new webpack.IgnorePlugin(/^((fs)|(path)|(os)|(crypto)|(source-map-support))$/, /vs(\/|\\)language(\/|\\)typescript(\/|\\)lib/) new webpack.IgnorePlugin(/^((module)|(fs)|(path)|(os)|(crypto)|(source-map-support))$/, /vs(\/|\\)language(\/|\\)typescript(\/|\\)lib/),
new UglifyJSPlugin(),
], ],
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment