File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ module.exports = function (content) {
254254 // unknown lang, infer the loader to be used
255255 switch ( type ) {
256256 case 'template' :
257- return defaultLoaders . html + '!' + templatePreprocessorPath + '?raw& engine=' + lang + '!'
257+ return defaultLoaders . html + '!' + templatePreprocessorPath + '?engine=' + lang + '!'
258258 case 'styles' :
259259 loader = addCssModulesToLoader ( defaultLoaders . css , part , index )
260260 return loader + '!' + styleCompiler + ensureBang ( ensureLoader ( lang ) )
Original file line number Diff line number Diff line change 22
33var cons = require ( 'consolidate' )
44var loaderUtils = require ( 'loader-utils' )
5- var extname = require ( 'path' ) . extname
65
76module . exports = function ( content ) {
87 this . cacheable && this . cacheable ( )
98 var callback = this . async ( )
109 var opt = loaderUtils . getOptions ( this ) || { }
1110
12- // this is never documented and should be deprecated
13- // but we'll keep it so we don't break stuff
14- var vue = this . options . __vueOptions__
15- if ( vue && vue . template ) {
16- for ( var key in vue . template ) {
17- opt [ key ] = vue . template [ key ]
18- }
19- }
20-
21- function exportContent ( content ) {
22- if ( opt . raw ) {
23- callback ( null , content )
24- } else {
25- callback ( null , 'module.exports = ' + JSON . stringify ( content ) )
26- }
27- }
28-
29- // with no engine given, use the file extension as engine
30- if ( ! opt . engine ) {
31- opt . engine = extname ( this . request ) . substr ( 1 ) . toLowerCase ( )
32- }
33-
3411 if ( ! cons [ opt . engine ] ) {
3512 return callback ( new Error (
3613 'Template engine \'' + opt . engine + '\' ' +
@@ -45,6 +22,6 @@ module.exports = function (content) {
4522 if ( err ) {
4623 return callback ( err )
4724 }
48- exportContent ( html )
25+ callback ( null , html )
4926 } )
5027}
You can’t perform that action at this time.
0 commit comments