feat: add logging setup for tauri desktop app (#397)
This commit is contained in:
parent
d856abef9d
commit
85f619ea82
5 changed files with 45 additions and 3 deletions
|
@ -32,6 +32,10 @@ export default defineNuxtConfig({
|
|||
querystring: 'rollup-plugin-node-polyfills/polyfills/qs',
|
||||
},
|
||||
vite: {
|
||||
// to make use of `TAURI_PLATFORM`, `TAURI_ARCH`, `TAURI_FAMILY`,
|
||||
// `TAURI_PLATFORM_VERSION`, `TAURI_PLATFORM_TYPE` and `TAURI_DEBUG`
|
||||
// env variables
|
||||
envPrefix: ['VITE_', 'TAURI_'],
|
||||
define: {
|
||||
'import.meta.env.__BUILD_TIME__': JSON.stringify(new Date().toISOString()),
|
||||
'import.meta.env.__BUILD_COMMIT__': JSON.stringify(process.env.COMMIT_REF || ''),
|
||||
|
@ -39,7 +43,7 @@ export default defineNuxtConfig({
|
|||
'process.mock': ((!isCI || isPreview) && process.env.MOCK_USER) || 'false',
|
||||
},
|
||||
build: {
|
||||
target: 'esnext',
|
||||
target: process.env.TAURI_PLATFORM ? ['es2021', 'chrome100', 'safari13'] : 'esnext',
|
||||
},
|
||||
plugins: [
|
||||
Inspect(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue