-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
75 lines (65 loc) · 1.64 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
75
const { resolve } = require('path');
const SystemJSPublicPathWebpackPlugin = require("systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin");
const packageJsonPath = resolve("package.json");
const { name } = require(packageJsonPath);
if (!name) {
throw Error(
`could not determine package name -- change your package json name field`
);
}
module.exports = {
css: {
extract: false,
},
publicPath: '/tools/videoplayer',
outputDir: 'tools/videoplayer',
filenameHashing: false,
transpileDependencies: ['vuetify'],
configureWebpack: {
devServer: {
port: 2917,
watchOptions: {
ignored: ['node_modules'],
aggregateTimeout: 300,
poll: 1500,
},
headers: {
'Access-Control-Allow-Origin': '*',
},
disableHostCheck: true,
public: 'localhost:2917/tools/videoplayer',
},
},
chainWebpack(config) {
config.module
.rule('js')
.use('babel-loader')
.tap((options) => {
return {
rootMode: 'upward',
}
})
config.externals([
'portal-vue',
'single-spa',
'vue',
'vuejs-dialog',
'vuetify',
'vuex',
'vue-router',
])
config.optimization.delete("splitChunks");
config.output.libraryTarget("umd");
config.output.devtoolNamespace(name);
config.set("devtool", "sourcemap");
config
.plugin("SystemJSPublicPathWebpackPlugin")
.use(SystemJSPublicPathWebpackPlugin, [
{
rootDirectoryLevel: 2,
systemjsModuleName: name,
},
]);
config.output.set("jsonpFunction", `webpackJsonp__${name}`);
},
}