Skip to content

Commit

Permalink
fix(es6): support node.js 4
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Feb 21, 2016
1 parent 4fa171a commit 2acaa30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 4 additions & 6 deletions lib/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,14 @@ module.exports = function (type, options) {
}
)
// add plugins
config.plugins = [
...config.plugins,
config.plugins = config.plugins.concat([
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
'__DEV__': true,
'process.env': JSON.stringify('development')
})
]
])
// inject autoInstall
if (options.autoInstall) {
config.plugins.push(new NpmInstallPlugin())
Expand All @@ -178,8 +177,7 @@ module.exports = function (type, options) {
loader: ExtractTextPlugin.extract('style-loader', 'css-loader!postcss-loader')
}
)
config.plugins = [
...config.plugins,
config.plugins = config.plugins.concat([
new webpack.optimize.OccurenceOrderPlugin(),
/*eslint-disable */
new webpack.DefinePlugin({
Expand All @@ -196,7 +194,7 @@ module.exports = function (type, options) {
comments: false
}),
new ExtractTextPlugin('styles.[contenthash].css')
]
])
}
return config
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,8 @@
"example/**",
"build/**"
]
},
"testen": {
"node": ["4.0.0", "4.2.4", "5.6.0"]
}
}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Real world example, run `npm start` in [this repo](https://github.com/egoist/how

## Usage

Installing `tooling` via NPM is easy (**WARN: only support node >=5**):
Installing `tooling` via NPM is easy (**WARN: only work for Node.js >= 4**):

```bash
npm install tooling -g
Expand Down

0 comments on commit 2acaa30

Please sign in to comment.