Skip to content

Commit 7a932e9

Browse files
committed
update config for latest webpack 2.0 changes
1 parent 1d02c5b commit 7a932e9

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

build/webpack.base.config.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ module.exports = {
1414
filename: 'client-bundle.js'
1515
},
1616
module: {
17-
loaders: [
17+
rules: [
1818
{
1919
test: /\.vue$/,
20-
loader: 'vue'
20+
loader: 'vue',
21+
options: vueConfig
2122
},
2223
{
2324
test: /\.js$/,
@@ -27,16 +28,11 @@ module.exports = {
2728
{
2829
test: /\.(png|jpg|gif|svg)$/,
2930
loader: 'url',
30-
query: {
31+
options: {
3132
limit: 10000,
3233
name: '[name].[ext]?[hash]'
3334
}
3435
}
3536
]
36-
},
37-
plugins: [
38-
new webpack.LoaderOptionsPlugin({
39-
vue: vueConfig
40-
})
41-
]
37+
}
4238
}

build/webpack.client.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const base = require('./webpack.base.config')
33
const vueConfig = require('./vue-loader.config')
44

55
const config = Object.assign({}, base, {
6-
plugins: base.plugins.concat([
6+
plugins: (base.plugins || []).concat([
77
// strip comments in Vue code
88
new webpack.DefinePlugin({
99
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"stylus": "^0.54.5",
3737
"stylus-loader": "^2.1.2",
3838
"url-loader": "^0.5.7",
39-
"vue-loader": "^9.5.0",
40-
"webpack": "^2.1.0-beta.20",
39+
"vue-loader": "^9.7.0",
40+
"webpack": "^2.1.0-beta.25",
4141
"webpack-dev-middleware": "^1.6.1",
4242
"webpack-hot-middleware": "^2.12.2"
4343
}

0 commit comments

Comments
 (0)