提交 | 用户 | age
|
36e1de
|
1 |
'use strict' |
L |
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 |
|
|
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 |
} |