forked from PatchyVideo/patchyvideo-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
66 lines (62 loc) · 1.77 KB
/
vue.config.js
File metadata and controls
66 lines (62 loc) · 1.77 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const webpack = require('webpack')
const path = require("path");
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
publicPath: './',
outputDir: 'dist',
configureWebpack: {
plugins: [
new BundleAnalyzerPlugin(),
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
'windows.jQuery':'jquery'
})
],
performance: {
hints:'warning',
//入口起点的最大体积
maxEntrypointSize: 50000000,
//生成文件的最大体积
maxAssetSize: 30000000,
//只给出 js 文件的性能提示
assetFilter: function(assetFilename) {
return assetFilename.endsWith('.js');
}
}
},
devServer: {
proxy: {
'/be/': {
target: "https://thvideo.tv/be/",
changeOrigin: true,
pathRewrite: {
'^/be/': ''
}
},
'/images/': {
target: "https://thvideo.tv/images/",
changeOrigin: true,
pathRewrite: {
'^/images/': ''
}
},
'/autocomplete/ ': {
target: "https://thvideo.tv/autocomplete/",
changeOrigin: true,
pathRewrite: {
'^/autocomplete/': ''
}
}
}
},
chainWebpack: config => {
config.module
.rule('i18n')
.resourceQuery(/blockType=i18n/)
.type('javascript/auto')
.use('i18n')
.loader('@kazupon/vue-i18n-loader')
.end()
}
}