@@ -4,41 +4,42 @@ const config = require('../config')
44const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' )
55const packageConfig = require ( '../package.json' )
66
7- exports . assetsPath = function ( _path ) {
8- const assetsSubDirectory = process . env . NODE_ENV === 'production'
9- ? config . build . assetsSubDirectory
10- : config . dev . assetsSubDirectory
7+ exports . assetsPath = function ( _path ) {
8+ const assetsSubDirectory =
9+ process . env . NODE_ENV === 'production'
10+ ? config . build . assetsSubDirectory
11+ : config . dev . assetsSubDirectory
1112
1213 return path . posix . join ( assetsSubDirectory , _path )
1314}
1415
15- exports . cssLoaders = function ( options ) {
16+ exports . cssLoaders = function ( options ) {
1617 options = options || { }
1718
1819 const cssLoader = {
1920 loader : 'css-loader' ,
2021 options : {
21- sourceMap : options . sourceMap
22- }
22+ sourceMap : options . sourceMap ,
23+ } ,
2324 }
2425
2526 const postcssLoader = {
2627 loader : 'postcss-loader' ,
2728 options : {
28- sourceMap : options . sourceMap
29- }
29+ sourceMap : options . sourceMap ,
30+ } ,
3031 }
3132
3233 // generate loader string to be used with extract text plugin
33- function generateLoaders ( loader , loaderOptions ) {
34+ function generateLoaders ( loader , loaderOptions ) {
3435 const loaders = options . usePostCSS ? [ cssLoader , postcssLoader ] : [ cssLoader ]
3536
3637 if ( loader ) {
3738 loaders . push ( {
3839 loader : loader + '-loader' ,
3940 options : Object . assign ( { } , loaderOptions , {
40- sourceMap : options . sourceMap
41- } )
41+ sourceMap : options . sourceMap ,
42+ } ) ,
4243 } )
4344 }
4445
@@ -47,7 +48,7 @@ exports.cssLoaders = function (options) {
4748 if ( options . extract ) {
4849 return ExtractTextPlugin . extract ( {
4950 use : loaders ,
50- fallback : 'vue-style-loader'
51+ fallback : 'vue-style-loader' ,
5152 } )
5253 } else {
5354 return [ 'vue-style-loader' ] . concat ( loaders )
@@ -62,20 +63,20 @@ exports.cssLoaders = function (options) {
6263 sass : generateLoaders ( 'sass' , { indentedSyntax : true } ) ,
6364 scss : generateLoaders ( 'sass' ) ,
6465 stylus : generateLoaders ( 'stylus' ) ,
65- styl : generateLoaders ( 'stylus' )
66+ styl : generateLoaders ( 'stylus' ) ,
6667 }
6768}
6869
6970// Generate loaders for standalone style files (outside of .vue)
70- exports . styleLoaders = function ( options ) {
71+ exports . styleLoaders = function ( options ) {
7172 const output = [ ]
7273 const loaders = exports . cssLoaders ( options )
7374
7475 for ( const extension in loaders ) {
7576 const loader = loaders [ extension ]
7677 output . push ( {
7778 test : new RegExp ( '\\.' + extension + '$' ) ,
78- use : loader
79+ use : loader ,
7980 } )
8081 }
8182
@@ -95,7 +96,7 @@ exports.createNotifierCallback = () => {
9596 title : packageConfig . name ,
9697 message : severity + ': ' + error . name ,
9798 subtitle : filename || '' ,
98- icon : path . join ( __dirname , 'logo.png' )
99+ icon : path . join ( __dirname , 'logo.png' ) ,
99100 } )
100101 }
101102}
0 commit comments