forked from beekeeper-studio/beekeeper-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
195 lines (190 loc) · 5.16 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
const webpack = require('webpack');
const fpmOptions = [
"--after-install=build/deb-postinstall"
]
if ( process.env.PI_BUILD ) {
fpmOptions.push("--architecture")
fpmOptions.push("armhf")
}
const externals = ['better-sqlite3', 'sequelize', 'typeorm', 'reflect-metadata', 'cassandra-driver', 'mysql2', 'ssh2']
module.exports = {
pluginOptions: {
electronBuilder: {
chainWebpackMainProcess: config => {
config.module
.rule('babel')
.test(/\.js$/)
.use('babel')
.loader('babel-loader')
.options({
presets: [
['@babel/preset-env', {
modules: false,
targets: {
esmodules: true
}
}],
],
plugins: [
['@babel/plugin-proposal-decorators', {legacy: true}],
['@babel/plugin-proposal-class-properties', {loose: true}],
]
})
},
nodeIntegration: true,
externals,
builderOptions: {
appId: "io.beekeeperstudio.desktop",
productName: "Beekeeper Studio",
releaseInfo: {
releaseNotesFile: "build/release-notes.md"
},
files: ['**/*', 'public/icons/**/*'],
afterSign: "electron-builder-notarize",
afterPack: "./build/afterPack.js",
extraResources: [
{
from: 'build/launcher-script.sh',
to: 'launcher-script.sh'
},
{
from: './public',
to: 'public'
}
],
fileAssociations: [
{
ext: 'db',
name: 'SQLite db file',
mimeType: 'application/vnd.sqlite3',
},
{
ext: 'sqlite3',
name: 'SQLite sqlite3 file',
mimeType: 'application/vnd.sqlite3'
},
{
ext: 'sqlite',
name: 'SQLite sqlite file',
mimeType: 'application/vnd.sqlite3'
}
],
protocols: [
{
name: "Amazon Redshift URL scheme",
schemes: ["redshift"],
role: "Editor"
},
{
name: "CockroachDB URL scheme",
schemes: ["cockroachdb", "cockroach"],
role: "Editor"
},
{
name: "MariaDB URL scheme",
schemes: ["mariadb"],
role: "Editor"
},
{
name: "MySQL URL scheme",
schemes: ["mysql"],
role: "Editor"
},
{
name: "PostgreSQL URL scheme",
schemes: ["postgresql", "postgres", "psql"],
role: "Editor"
},
{
name: "SQLite URL scheme",
schemes: ["sqlite"],
role: "Editor"
},
{
name: "SQL Server URL scheme",
schemes: ["sqlserver", "microsoftsqlserver", "mssql"],
role: "Editor"
}
],
mac: {
entitlements: "./build/entitlements.mac.plist",
entitlementsInherit: "./build/entitlements.mac.plist",
icon: './public/icons/mac/bk-icon.icns',
category: "public.app-category.developer-tools",
"hardenedRuntime": true
},
linux: {
icon: './public/icons/png/',
category: "Development",
target: [
'snap',
'deb',
'appImage'
],
desktop: {
'StartupWMClass': 'beekeeper-studio'
},
},
deb: {
publish: [
'github'
],
fpm: fpmOptions,
// when we upgrade Electron we need to check these
depends: ["libgtk-3-0", "libnotify4", "libnss3", "libxss1", "libxtst6", "xdg-utils", "libatspi2.0-0", "libuuid1", "libappindicator3-1", "libsecret-1-0", "gnupg"]
},
appImage: {
publish: ['github'],
},
snap: {
publish: [
'github',
'snapStore'
],
environment: {
"ELECTRON_SNAP": "true"
},
plugs: ["default", "ssh-keys", "removable-media", "mount-observe"]
},
win: {
icon: './public/icons/png/512x512.png',
target: ['nsis', 'portable']
},
portable: {
"artifactName": "${productName}-${version}-portable.exe",
},
}
}
},
configureWebpack: {
plugins: [
new webpack.IgnorePlugin(/pg-native/, /pg/),
new webpack.IgnorePlugin(/kerberos/, /cassandra-driver/)
],
// externals: {
// // Possible drivers for knex - we'll ignore them
// // 'sqlite3': 'sqlite3',
// 'mariasql': 'mariasql',
// // 'mssql': 'mssql',
// 'mysql': 'mysql',
// 'oracle': 'oracle',
// 'strong-oracle': 'strong-oracle',
// 'oracledb': 'oracledb',
// // 'pg': 'pg',
// // 'pg-query-stream': 'pg-query-stream'
// },
node: {
dns: 'mock'
},
module: {
rules: [
{
test: /node_modules[/\\](iconv-lite)[/\\].+/,
resolve: {
aliasFields: ['main']
}
}
]
}
}
}