forked from FoundKeyGang/FoundKey
Enable scope hoisting
This commit is contained in:
parent
66224f5ac6
commit
9efdfa314f
3 changed files with 7 additions and 2 deletions
|
@ -89,7 +89,7 @@
|
||||||
"uglify-es": "3.0.20",
|
"uglify-es": "3.0.20",
|
||||||
"uglify-es-webpack-plugin": "0.0.2",
|
"uglify-es-webpack-plugin": "0.0.2",
|
||||||
"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony",
|
"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony",
|
||||||
"webpack": "2.6.1"
|
"webpack": "3.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"accesses": "2.5.0",
|
"accesses": "2.5.0",
|
||||||
|
|
3
webpack/plugins/hoist.ts
Normal file
3
webpack/plugins/hoist.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import * as webpack from 'webpack';
|
||||||
|
|
||||||
|
export default () => new webpack.optimize.ModuleConcatenationPlugin();
|
|
@ -1,6 +1,7 @@
|
||||||
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
||||||
|
|
||||||
import constant from './const';
|
import constant from './const';
|
||||||
|
import hoist from './hoist';
|
||||||
//import minify from './minify';
|
//import minify from './minify';
|
||||||
import banner from './banner';
|
import banner from './banner';
|
||||||
|
|
||||||
|
@ -12,7 +13,8 @@ const isProduction = env === 'production';
|
||||||
export default version => {
|
export default version => {
|
||||||
const plugins = [
|
const plugins = [
|
||||||
constant(),
|
constant(),
|
||||||
new StringReplacePlugin()
|
new StringReplacePlugin(),
|
||||||
|
hoist()
|
||||||
];
|
];
|
||||||
/*
|
/*
|
||||||
if (isProduction) {
|
if (isProduction) {
|
||||||
|
|
Loading…
Reference in a new issue