vue-loader.conf.js 622 B

123456789101112131415161718192021222324
  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. postcss:[require('postcss-px2rem')({'remUnit':75.0,'baseDpr':2})]
  22. }