-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
49 lines (48 loc) · 1.14 KB
/
vue.config.js
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
39
40
41
42
43
44
45
46
47
48
49
const webpack = require('webpack');
// eslint-disable-line import/no-extraneous-dependencies
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
// const path = require('path');
module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? '//bos.dongchangdi.com' : '',
css: {
loaderOptions: {
sass: {
data: '@import "@/global.scss";',
},
},
},
configureWebpack: {
module: {
rules: [
{
test: /\.html$/,
use: 'raw-loader',
}
],
},
},
chainWebpack: (config) => {
config
.plugin('provide')
.use(webpack.ProvidePlugin, [{
mapboxgl: 'mapbox-gl',
}]);
// 别动md的loader,这里就是这样的
config.module.rule('md')
.test(/\.md/)
.use('raw-loader')
.loader('raw-loader')
.end();
config.module.rule('images').use('url-loader').loader('url-loader').tap(options => Object.assign(options, { limit: 10240 }));
},
pluginOptions: {
webpackBundleAnalyzer: {
openAnalyzer: false,
},
},
devServer: {
host: '0.0.0.0',
port: 8080,
https: true
},
};