vue-loader.conf.js 520 B

12345678910111213141516171819202122
  1. 'use strict'
  2. const utils = require('./utils')
  3. const config = require('../config')
  4. const isProduction = process.env.NODE_ENV === 'production'
  5. module.exports = function(options){
  6. return {
  7. loaders: utils.cssLoaders({
  8. sourceMap: isProduction
  9. ? config.build.productionSourceMap
  10. : config.dev.cssSourceMap,
  11. extract: isProduction,
  12. project: options.project
  13. }),
  14. transformToRequire: {
  15. video: 'src',
  16. source: 'src',
  17. img: 'src',
  18. image: 'xlink:href'
  19. }
  20. }
  21. }