vue-loader.conf.js 641 B

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