Skip to content

Commit c6fc82f

Browse files
committed
bump deps + fix compat with extract-text-webpack-plugin 2.0 rc (fix #594)
1 parent b8d6df7 commit c6fc82f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

lib/loader.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,24 @@ module.exports = function (content) {
125125
})
126126
}
127127

128+
// stringify an Array of loader objects
129+
function stringifyLoaders (loaders) {
130+
return loaders.map(function (obj) {
131+
return obj && typeof obj === 'object' && typeof obj.loader === 'string'
132+
? obj.loader + (obj.options ? '?' + JSON.stringify(obj.options) : '')
133+
: obj
134+
}).join('!')
135+
}
136+
128137
function getLoaderString (type, part, index, scoped) {
129138
var lang = part.lang || defaultLang[type]
130139
var loader = loaders[lang]
131140
var rewriter = type === 'styles' ? styleRewriter + (scoped ? '&scoped=true!' : '!') : ''
132141
var injectString = (type === 'script' && query.inject) ? 'inject-loader!' : ''
133142
if (loader !== undefined) {
143+
if (Array.isArray(loader)) {
144+
loader = stringifyLoaders(loader)
145+
}
134146
// add css modules
135147
if (type === 'styles') {
136148
loader = addCssModulesToLoader(loader, part, index)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"eslint-config-vue": "^1.0.0",
5959
"eslint-plugin-html": "^1.5.2",
6060
"expose-loader": "^0.7.1",
61-
"extract-text-webpack-plugin": "^2.0.0-beta.4",
61+
"extract-text-webpack-plugin": "^2.0.0-rc.0",
6262
"file-loader": "^0.9.0",
6363
"inject-loader": "^2.0.0",
6464
"jsdom": "^9.2.1",
@@ -75,6 +75,6 @@
7575
"url-loader": "^0.5.7",
7676
"vue": "^2.1.0",
7777
"vue-template-compiler": "^2.1.0",
78-
"webpack": "^2.1.0-beta.27"
78+
"webpack": "^2.2.0"
7979
}
8080
}

0 commit comments

Comments
 (0)