1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| const px2rem = require('postcss-px2rem')
| const path = require('path')
|
| const postcss = px2rem({
| remUnit: 20 //基准大小 baseSize,需要和rem.js中相同
| });
|
| module.exports = {
| publicPath: './',
| productionSourceMap: false,
| configureWebpack: config => {
| config.externals = {
| BMap: "BMap"
| }
| config.resolve.modules = [path.resolve('node_modules'), 'node_modules'];
| },
| css: {
| loaderOptions: {
| css: {},
| postcss: {
| plugins: [
| postcss
| ]
| }
| }
| },
| devServer: {
| https: false,
| disableHostCheck: true,
| },
| chainWebpack: (config) => {
| config.module.rule('swf')
| .test(/\.swf/)
| .use('url-loader')
| .loader('url-loader')
| .options({ limit: 10000 })
| },
| }
|
|