forked from bridge-core/editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
60 lines (57 loc) · 1.54 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
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
const WorkerPlugin = require('worker-plugin')
const { join } = require('path')
const { NormalModuleReplacementPlugin } = require('webpack')
const isNightlyBuild = process.argv[3] === '--nightly'
const publicPath = '/'
module.exports = {
runtimeCompiler: true,
publicPath,
transpileDependencies: ['vuetify', 'molang'],
pwa: {
name: isNightlyBuild ? 'bridge Nightly' : 'bridge v2',
appleMobileWebAppCapable: true,
themeColor: '#1778D2',
msTileColor: '#0F0F0F',
manifestOptions: {
background_color: '#0F0F0F',
capture_links: [
// 'existing-client-event', //Doesn't work yet but we can use "exisiting-client-navigate" because we're a SPA
'existing-client-navigate',
],
file_handlers: [
{
action: publicPath,
accept: {
'application/zip': [
'.mcaddon',
'.mcpack',
'.mcworld',
'.mctemplate',
],
'application/json': ['.json'],
'application/javascript': ['.js', '.ts'],
'text/plain': ['.mcfunction', '.molang', '.lang'],
'image/*': ['.tga', '.png', '.jpg', '.jpeg'],
},
},
],
display_override: ['window-controls-overlay', 'standalone'],
},
},
configureWebpack: {
resolve: {
alias: {
'/@': join(__dirname, './src'),
},
},
plugins: [
new NormalModuleReplacementPlugin(
/molangjs/,
join(__dirname, './src/utils/MoLangJS.ts')
),
new MonacoWebpackPlugin({ features: ['!toggleHighContrast'] }),
new WorkerPlugin({ globalObject: 'self' }),
],
},
}