File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 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" ,
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}
You can’t perform that action at this time.
0 commit comments