vue-loader.conf.js 585 B

1234567891011121314151617181920
  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 ? config.build.productionSourceMap : config.dev.cssSourceMap
  6. module.exports = {
  7. loaders: utils.cssLoaders({
  8. sourceMap: sourceMapEnabled,
  9. extract: isProduction
  10. }),
  11. cssSourceMap: sourceMapEnabled,
  12. cacheBusting: config.dev.cacheBusting,
  13. transformToRequire: {
  14. video: ['src', 'poster'],
  15. source: 'src',
  16. img: 'src',
  17. image: 'xlink:href'
  18. }
  19. }