Advertisement
Guest User

Untitled

a guest
Mar 9th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const utils = require('./utils')
  2. const config = require('./config')
  3. const isProduction = process.env.NODE_ENV === 'production'
  4. const sourceMapEnabled = isProduction
  5.   ? config.prod.productionSourceMap
  6.   : config.dev.cssSourceMap
  7.  
  8. module.exports = (options) => {
  9.   return {
  10.     loaders: utils.cssLoaders({
  11.       // sourceMap: use sourcemao or not.
  12.       sourceMap: options && sourceMapEnabled,
  13.       // useVue: use vue-style-loader or not
  14.       useVue: options && options.useVue,
  15.       // usePostCSS: use postcss to compile styles.
  16.       usePostCSS: options && options.usePostCSS
  17.     }),
  18.     cssSourceMap: sourceMapEnabled,
  19.     cacheBusting: config.dev.cacheBusting
  20.   }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement