Enable scope hoisting

This commit is contained in:
syuilo 2017-06-26 09:04:42 +09:00
parent 38b2f97e3b
commit 4dba396cbe
3 changed files with 7 additions and 2 deletions

View file

@ -89,7 +89,7 @@
"uglify-es": "3.0.20",
"uglify-es-webpack-plugin": "0.0.2",
"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony",
"webpack": "2.6.1"
"webpack": "3.0.0"
},
"dependencies": {
"accesses": "2.5.0",

3
webpack/plugins/hoist.ts Normal file
View file

@ -0,0 +1,3 @@
import * as webpack from 'webpack';
export default () => new webpack.optimize.ModuleConcatenationPlugin();

View file

@ -1,6 +1,7 @@
const StringReplacePlugin = require('string-replace-webpack-plugin');
import constant from './const';
import hoist from './hoist';
//import minify from './minify';
import banner from './banner';
@ -12,7 +13,8 @@ const isProduction = env === 'production';
export default version => {
const plugins = [
constant(),
new StringReplacePlugin()
new StringReplacePlugin(),
hoist()
];
/*
if (isProduction) {