File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
Original file line number Diff line number Diff line change @@ -36,16 +36,17 @@ var defaultLang = {
36
36
module . exports = function ( content ) {
37
37
this . cacheable ( )
38
38
var isServer = this . options . target === 'node'
39
+ var isProduction = this . minimize || process . env . NODE_ENV === 'production'
40
+
39
41
var loaderContext = this
40
42
var query = loaderUtils . parseQuery ( this . query )
41
43
var options = this . options . __vueOptions__ = Object . assign ( { } , this . options . vue , this . vue , query )
44
+
42
45
var filePath = this . resourcePath
43
46
var fileName = path . basename ( filePath )
44
47
var moduleId = 'data-v-' + genId ( filePath )
45
48
var styleRewriter = styleRewriterPath + '?id=' + moduleId
46
49
47
- var isProduction = this . minimize || process . env . NODE_ENV === 'production'
48
-
49
50
var needCssSourceMap =
50
51
! isProduction &&
51
52
this . sourceMap &&
Original file line number Diff line number Diff line change @@ -3,11 +3,7 @@ var fs = require('fs')
3
3
var path = require ( 'path' )
4
4
5
5
exports . lib = function ( file ) {
6
- if ( IS_TEST ) {
7
- return path . resolve ( __dirname , file )
8
- } else {
9
- return 'vue-loader/lib/' + file
10
- }
6
+ return path . resolve ( __dirname , file )
11
7
}
12
8
13
9
exports . dep = function ( dep ) {
Original file line number Diff line number Diff line change 1
1
process . env . VUE_LOADER_TEST = true
2
2
3
3
var path = require ( 'path' )
4
+ var jsdom = require ( 'jsdom' )
4
5
var webpack = require ( 'webpack' )
5
6
var MemoryFS = require ( 'memory-fs' )
6
- var jsdom = require ( 'jsdom' )
7
7
var expect = require ( 'chai' ) . expect
8
8
var genId = require ( '../lib/gen-id' )
9
- var SourceMapConsumer = require ( 'source-map' ) . SourceMapConsumer
10
- var ExtractTextPlugin = require ( "extract-text-webpack-plugin" )
11
9
var compiler = require ( '../lib/template-compiler' )
12
10
var normalizeNewline = require ( 'normalize-newline' )
11
+ var ExtractTextPlugin = require ( "extract-text-webpack-plugin" )
12
+ var SourceMapConsumer = require ( 'source-map' ) . SourceMapConsumer
13
13
14
14
var loaderPath = 'expose-loader?vueModule!' + path . resolve ( __dirname , '../index.js' )
15
15
var mfs = new MemoryFS ( )
You can’t perform that action at this time.
0 commit comments