Skip to content

Commit 9d6a2e6

Browse files
authored
fix: avoid a sandbox escape in vite config resolution (#615)
Fixes #614
1 parent f143ab7 commit 9d6a2e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/vue/vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export default defineConfig({
99
plugins: [vue(), vueJsx()],
1010
resolve: {
1111
alias: {
12-
'@': fileURLToPath(new URL('./src', import.meta.url)),
12+
// WORKAROUND: Use process.cwd() instead of import.meta.url to avoid sandbox escape
13+
// See https://github.com/bazelbuild/examples/issues/614
14+
// @ts-ignore - We know process exists at runtime
15+
'@': process.cwd() + '/src',
1316
},
1417
dedupe: ['vue'],
1518
},

0 commit comments

Comments
 (0)