Spaces:
Running
Running
Download source/teaql-ts/examples/browser-sqlite/vite.config.ts from teaql/browser-sqlite-playground: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/spaces/teaql/browser-sqlite-playground/resolve/main/source/teaql-ts/examples/browser-sqlite/vite.config.ts
- Command line
-
hf download hf://spaces/teaql/browser-sqlite-playground/source/teaql-ts/examples/browser-sqlite/vite.config.ts
-
curl -L -o vite.config.ts https://huggingface.co/spaces/teaql/browser-sqlite-playground/resolve/main/source/teaql-ts/examples/browser-sqlite/vite.config.ts
1.33 kB
| import { defineConfig } from 'vite'; | |
| import { fileURLToPath, URL } from 'node:url'; | |
| export default defineConfig({ | |
| build: { rollupOptions: { input: { | |
| main: 'index.html', workItems: 'work-items.html', orders: 'orders.html', | |
| } } }, | |
| resolve: { | |
| preserveSymlinks: true, | |
| alias: [ | |
| { find: /^teaql-ts$/, replacement: fileURLToPath(new URL('../../src/index.ts', import.meta.url)) }, | |
| { find: /^teaql-ts\/sql\/core$/, replacement: fileURLToPath(new URL('../../src/sql/core.ts', import.meta.url)) }, | |
| { find: /^teaql-ts\/sql\/browser-sqlite$/, replacement: fileURLToPath(new URL('../../src/sql/browser-sqlite.ts', import.meta.url)) }, | |
| { find: /^teaql-ts\/sql\/browser-sqlite-worker$/, replacement: fileURLToPath(new URL('../../src/sql/browser-sqlite-worker.ts', import.meta.url)) }, | |
| { find: /^@sqlite\.org\/sqlite-wasm$/, replacement: fileURLToPath(new URL('./node_modules/@sqlite.org/sqlite-wasm/dist/index.mjs', import.meta.url)) }, | |
| ], | |
| }, | |
| optimizeDeps: { exclude: ['@sqlite.org/sqlite-wasm'] }, | |
| server: { | |
| headers: { | |
| 'Cross-Origin-Opener-Policy': 'same-origin', | |
| 'Cross-Origin-Embedder-Policy': 'require-corp', | |
| }, | |
| }, | |
| preview: { | |
| headers: { | |
| 'Cross-Origin-Opener-Policy': 'same-origin', | |
| 'Cross-Origin-Embedder-Policy': 'require-corp', | |
| }, | |
| }, | |
| }); | |