forked from FTBTeam/FTB-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
95 lines (92 loc) · 3.11 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
const path = require('path');
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
const webpackPlugins = [];
//process.env.CI_COMMIT_BRANCH === 'develop' add back when we start using preview builds in production
if (
process.env.SENTRY_AUTH_TOKEN &&
(process.env.VERSION || process.env.VERSION_OVERRIDE) &&
(process.env.CI_COMMIT_BRANCH === 'release' || process.env.CI_COMMIT_BRANCH === 'develop')
) {
webpackPlugins.push(
new SentryWebpackPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: 'creeperhost',
project: 'ftb-app',
release: `${process.env.VERSION || process.env.VERSION_OVERRIDE}-${process.env.VUE_APP_PLATFORM}`,
include: process.env.TARGET_PLATFORM === 'overwolf' ? './overwolf/dist/desktop/' : './dist_electron/bundled/',
ignore: ['node_modules', 'webpack.config.js'],
}),
);
} else {
console.warn("Can't run Sentry source map uploader");
}
module.exports = {
publicPath: './',
outputDir:
process.env.TARGET_PLATFORM === 'overwolf'
? path.resolve(__dirname, './overwolf/dist/desktop')
: path.resolve(__dirname, './dist'),
chainWebpack: (config) => {
if (process.env.TARGET_PLATFORM === 'overwolf') {
config.plugin('copy').tap((options) => {
options[0][0].ignore.push('./public/css/**/*');
options[0][0].ignore.push('/public/css/**/*');
options[0][0].ignore.push('public/css/**/*');
options[0][0].ignore.push('/css/**/*');
options[0][0].ignore.push('css/**/*');
options[0][0].ignore.push('./public/img/**/*');
options[0][0].ignore.push('/public/img/**/*');
options[0][0].ignore.push('public/img/**/*');
options[0][0].ignore.push('/img/**/*');
options[0][0].ignore.push('img/**/*');
return options;
});
}
},
pages: {
index: {
// entry for the page
entry: 'src/main.ts',
template: process.env.TARGET_PLATFORM === 'overwolf' ? 'public/index-overwolf.html' : 'public/index.html',
filename: 'index.html',
title: 'FTB App',
chunks: ['chunk-vendors', 'chunk-common', 'index'],
},
chatPage: 'src/main.ts',
},
pluginOptions: {
electronBuilder: {
nodeIntegration: true,
builderOptions: {
generateUpdatesFilesForAllChannels: true,
productName: 'ftbapp',
appId: 'com.feedthebeast.Launcher',
mac: {
// #TODO https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
identity: 'null',
hardenedRuntime: true,
gatekeeperAssess: false,
entitlements: 'build/entitlements.mac.plist',
entitlementsInherit: 'build/entitlements.mac.plist',
target: ['dir'],
},
win: {
target: ['portable'],
artifactName: '${productName}.${ext}',
},
linux: {
target: ['AppImage'],
category: 'Game',
artifactName: '${productName}.${ext}',
},
directories: {
output: 'release',
buildResources: 'resources',
},
},
},
},
configureWebpack: {
plugins: webpackPlugins,
},
};