vue-loader.conf.js 553B

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