hoppscotch/packages/hoppscotch-js-sandbox/vite.config.ts
James George 22c6eabd13
chore: migrate Node.js implementation for js-sandbox to isolated-vm (#3973)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
2024-04-19 21:08:46 +05:30

30 lines
543 B
TypeScript

import { resolve } from "path"
import { defineConfig } from "vite"
export default defineConfig({
build: {
outDir: "./dist",
emptyOutDir: true,
lib: {
entry: {
web: "./src/web/index.ts",
node: "./src/node/index.ts",
},
name: "js-sandbox",
formats: ["es", "cjs"],
},
rollupOptions: {
external: ["module"],
},
},
test: {
environment: "node",
setupFiles: ["./setupFiles.ts"],
},
resolve: {
alias: {
"~": resolve(__dirname, "./src"),
},
},
})