-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
74 lines (73 loc) · 2.2 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const WebpackCdnPlugin = require('webpack-cdn-plugin')
const express = require('express')
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:5000',
},
'/__': {
target: 'http://localhost:5000',
},
},
public: 'http://localhost:8080',
setup (app) {
app.use('/node_modules', express.static('./node_modules'))
},
},
integrity: true,
configureWebpack: {
plugins: [
new WebpackCdnPlugin({
publicPath: '/node_modules',
prod: process.env.NODE_ENV === 'production',
prodUrl: '//cdn.jsdelivr.net/npm/:name@:version/:path',
optimize: true,
modules: [
{ name: 'vue', var: 'Vue', path: 'dist/vue.runtime.min.js' },
{ name: 'vue-router', var: 'VueRouter', path: 'dist/vue-router.min.js' },
{ name: 'vuex', var: 'Vuex', path: 'dist/vuex.min.js' },
{ name: 'three', var: 'THREE', path: 'build/three.min.js' },
{ name: 'leaflet', var: 'L', path: 'dist/leaflet.js', style: 'dist/leaflet.css' },
{ name: 'axios', path: 'dist/axios.min.js' },
{
name: 'firebaseui',
path: 'firebaseui.js',
prodUrl: '//www.gstatic.com/firebasejs/ui/:version/firebase-ui-auth.js',
devUrl: ':name/dist/:path',
},
{
name: 'firebaseui',
style: 'firebaseui.css',
cssOnly: true,
prodUrl: '//www.gstatic.com/firebasejs/ui/:version/firebase-ui-auth.css',
devUrl: ':name/dist/:path',
},
{
name: 'firebase',
var: 'firebase',
paths: [
'firebase-app.js',
'firebase-auth.js',
'firebase-firestore.js',
'firebase-functions.js',
],
prodUrl: '//www.gstatic.com/firebasejs/:version/:path',
},
{
name: 'firebase-init',
var: 'firebase',
path: 'init.js',
prodUrl: '/__/firebase/:path',
devUrl: 'firebaseInit.js',
},
],
}),
]
},
pluginOptions: {
webpackBundleAnalyzer: {
openAnalyzer: false,
},
},
}