Skip to content

Commit 2acaa30

Browse files
committed
fix(es6): support node.js 4
1 parent 4fa171a commit 2acaa30

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

lib/webpack.config.base.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,14 @@ module.exports = function (type, options) {
143143
}
144144
)
145145
// add plugins
146-
config.plugins = [
147-
...config.plugins,
146+
config.plugins = config.plugins.concat([
148147
new webpack.HotModuleReplacementPlugin(),
149148
new webpack.NoErrorsPlugin(),
150149
new webpack.DefinePlugin({
151150
'__DEV__': true,
152151
'process.env': JSON.stringify('development')
153152
})
154-
]
153+
])
155154
// inject autoInstall
156155
if (options.autoInstall) {
157156
config.plugins.push(new NpmInstallPlugin())
@@ -178,8 +177,7 @@ module.exports = function (type, options) {
178177
loader: ExtractTextPlugin.extract('style-loader', 'css-loader!postcss-loader')
179178
}
180179
)
181-
config.plugins = [
182-
...config.plugins,
180+
config.plugins = config.plugins.concat([
183181
new webpack.optimize.OccurenceOrderPlugin(),
184182
/*eslint-disable */
185183
new webpack.DefinePlugin({
@@ -196,7 +194,7 @@ module.exports = function (type, options) {
196194
comments: false
197195
}),
198196
new ExtractTextPlugin('styles.[contenthash].css')
199-
]
197+
])
200198
}
201199
return config
202200
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,8 @@
9696
"example/**",
9797
"build/**"
9898
]
99+
},
100+
"testen": {
101+
"node": ["4.0.0", "4.2.4", "5.6.0"]
99102
}
100103
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Real world example, run `npm start` in [this repo](https://github.com/egoist/how
3535

3636
## Usage
3737

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

4040
```bash
4141
npm install tooling -g

0 commit comments

Comments
 (0)