mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 12:19:08 +01:00
22 lines
548 B
TypeScript
22 lines
548 B
TypeScript
import { addPlugin, createResolver, defineNuxtModule, useNuxt } from '@nuxt/kit'
|
|
|
|
export default defineNuxtModule({
|
|
meta: {
|
|
name: 'tauri',
|
|
},
|
|
setup() {
|
|
const nuxt = useNuxt()
|
|
const { resolve } = createResolver(import.meta.url)
|
|
|
|
if (!process.env.TAURI_PLATFORM)
|
|
return
|
|
|
|
nuxt.hook('vite:extend', ({ config }) => {
|
|
config.build!.target = ['es2021', 'chrome100', 'safari13']
|
|
config.envPrefix = [...config.envPrefix || [], 'VITE_', 'TAURI_']
|
|
})
|
|
|
|
addPlugin(resolve('./runtime/logging.client'))
|
|
},
|
|
})
|