File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
- import { defineConfig } from 'vite'
2
- import { svelte } from '@sveltejs/vite-plugin-svelte'
3
- import { fileURLToPath , URL } from 'node:url' ;
1
+ import { defineConfig } from 'vite' ;
2
+ import { svelte } from '@sveltejs/vite-plugin-svelte' ;
3
+ import { fileURLToPath } from 'node:url' ;
4
+ import { dirname } from 'node:path' ;
5
+ import { createRequire } from 'node:module' ;
6
+
7
+ const require = createRequire ( import . meta. url ) ;
8
+ const workerDir = dirname ( require . resolve ( 'sql.js-httpvfs/dist/sqlite.worker.js' ) ) ;
9
+ const projectRoot = fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
4
10
5
11
// https://vitejs.dev/config/
6
12
export default defineConfig ( {
7
13
plugins : [ svelte ( ) ] ,
14
+ server : {
15
+ fs : {
16
+ allow : [ projectRoot , workerDir ] ,
17
+ } ,
18
+ } ,
8
19
// resolve: {
9
20
// alias: {
10
21
// '@muonw/powertable': fileURLToPath(new URL('./node_modules/@muonw/powertable/index.js', import.meta.url))
You can’t perform that action at this time.
0 commit comments