瀏覽代碼

Updates dependencies

Adds new webpack tree shaking plugin
main
Eric Amodio 6 年之前
父節點
當前提交
6f76796836
共有 3 個文件被更改,包括 33 次插入4 次删除
  1. +22
    -3
      package-lock.json
  2. +2
    -1
      package.json
  3. +9
    -0
      webpack.config.js

+ 22
- 3
package-lock.json 查看文件

@ -10265,9 +10265,9 @@
}
},
"ts-loader": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.4.2.tgz",
"integrity": "sha512-Z3Y1a7A0KZZ1s/mAZkt74l1NAF7Y5xUhD1V9VB8/1eUlUOk8Qa/oo46tO2Uu5kQ3wXypOlbv77lLQySjXEDcdw==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.5.0.tgz",
"integrity": "sha512-ihgVaSmgrX4crGV4n7yuoHPoCHbDzj9aepCZR9TgIx4SgJ9gdnB6xLHgUBb7bsFM/f0K6x9iXa65KY/Fu1Klkw==",
"dev": true,
"requires": {
"chalk": "^2.3.0",
@ -11276,6 +11276,25 @@
}
}
},
"webpack-deep-scope-analysis": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/webpack-deep-scope-analysis/-/webpack-deep-scope-analysis-1.3.6.tgz",
"integrity": "sha1-cpoBV+lYaM3/y0u3sIzA5vTsjLQ=",
"dev": true,
"requires": {
"esrecurse": "^4.2.1",
"estraverse": "^4.2.0"
}
},
"webpack-deep-scope-plugin": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/webpack-deep-scope-plugin/-/webpack-deep-scope-plugin-1.3.6.tgz",
"integrity": "sha1-jQKLi4dfDMTXQj4b62105WYtSxo=",
"dev": true,
"requires": {
"webpack-deep-scope-analysis": "^1.3.6"
}
},
"webpack-log": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz",

+ 2
- 1
package.json 查看文件

@ -3611,11 +3611,12 @@
"tslint": "5.11.0",
"tslint-loader": "3.6.0",
"tslint-prettiest": "0.0.1",
"ts-loader": "4.4.2",
"ts-loader": "4.5.0",
"typescript": "3.0.1",
"vscode": "1.1.21",
"webpack": "4.16.5",
"webpack-cli": "3.1.0",
"webpack-deep-scope-plugin": "1.3.6",
"webpack-node-externals": "1.7.2"
}
}

+ 9
- 0
webpack.config.js 查看文件

@ -7,6 +7,7 @@ const HtmlInlineSourcePlugin = require('html-webpack-inline-source-plugin');
const HtmlPlugin = require('html-webpack-plugin');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const WebpackDeepScopeAnalysisPlugin = require('webpack-deep-scope-plugin').default;
module.exports = function(env, argv) {
env = env || {};
@ -18,6 +19,10 @@ module.exports = function(env, argv) {
function getExtensionConfig(env) {
const plugins = [new CleanPlugin(['out'], { verbose: false })];
// Comment out for now, as it errors
// if (env.production) {
// plugins.push(new WebpackDeepScopeAnalysisPlugin());
// }
return {
name: 'extension',
@ -133,6 +138,10 @@ function getUIConfig(env) {
})
];
if (env.production) {
plugins.push(new WebpackDeepScopeAnalysisPlugin());
}
return {
name: 'ui',
context: path.resolve(__dirname, 'src/ui'),

Loading…
取消
儲存