2024-10-10 14:17:36 +00:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2024-10-16 09:16:31 +00:00
|
|
|
'/config_terminal': process.env.WEBVM_MODE == "github" ? 'config_github_terminal.js' : 'config_public_terminal.js',
|
|
|
|
"@leaningtech/cheerpx": process.env.CX_URL ? process.env.CX_URL : "@leaningtech/cheerpx"
|
2024-10-10 14:17:36 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
build: {
|
|
|
|
target: "es2022"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
sveltekit(),
|
|
|
|
viteStaticCopy({
|
|
|
|
targets: [
|
|
|
|
{ src: 'tower.ico', dest: '' },
|
|
|
|
{ src: 'scrollbar.css', dest: '' },
|
|
|
|
{ src: 'serviceWorker.js', dest: '' },
|
2024-10-13 09:22:53 +00:00
|
|
|
{ src: 'login.html', dest: '' },
|
2024-10-14 19:51:30 +00:00
|
|
|
{ src: 'assets/', dest: '' }
|
2024-10-10 14:17:36 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
]
|
|
|
|
});
|