refac: transformer.js

This commit is contained in:
Timothy Jaeryang Baek
2025-02-08 02:34:30 -08:00
parent 9be8bea6f4
commit 181fca4707
4 changed files with 132 additions and 75 deletions

View File

@@ -1,6 +1,8 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
// /** @type {import('vite').Plugin} */
// const viteServerConfig = {
// name: 'log-request-middleware',
@@ -16,7 +18,18 @@ import { defineConfig } from 'vite';
// };
export default defineConfig({
plugins: [sveltekit()],
plugins: [
sveltekit(),
viteStaticCopy({
targets: [
{
src: 'node_modules/onnxruntime-web/dist/*.jsep.*',
dest: 'wasm'
}
]
})
],
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
APP_BUILD_HASH: JSON.stringify(process.env.APP_BUILD_HASH || 'dev-build')