vue - vue-loader.conf

 

 1 'use strict'
 2 // 工具=> build/util.js
 3 const utils = require('./utils')
 4 // 配置=> build/config/index.js
 5 const config = require('../config')
 6 
 7 const isProduction = process.env.NODE_ENV === 'production'
 8 const sourceMapEnabled = isProduction
 9   ? config.build.productionSourceMap
10   : config.dev.cssSourceMap
11 
12 
13 //对象模块导出{} 
14 module.exports = {
15   loaders: utils.cssLoaders({
16     sourceMap: sourceMapEnabled,
17     extract: isProduction
18   }),
19   cssSourceMap: sourceMapEnabled,
20   cacheBusting: config.dev.cacheBusting,
21   transformToRequire: {
22     video: ['src', 'poster'],
23     source: 'src',
24     img: 'src',
25     image: 'xlink:href'
26   }
27 }

 

posted @ 2018-09-08 16:59  Sunsin  阅读(707)  评论(0编辑  收藏  举报