refactor(scripting-revamp): migrate js-sandbox to web worker/Node vm based implementation (#3619)
This commit is contained in:
25
packages/hoppscotch-js-sandbox/vite.config.ts
Normal file
25
packages/hoppscotch-js-sandbox/vite.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { resolve } from "path"
|
||||
import { defineConfig } from "vite"
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: "./dist",
|
||||
emptyOutDir: true,
|
||||
lib: {
|
||||
entry: {
|
||||
web: "./src/web.ts",
|
||||
node: "./src/node.ts",
|
||||
},
|
||||
name: "js-sandbox",
|
||||
formats: ["es", "cjs"],
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ["vm"],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"~": resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user