Files
editor/vite.config.ts
T
2023-12-25 22:00:09 +00:00

34 lines
733 B
TypeScript

import replace from "@rollup/plugin-replace";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import istanbul from "vite-plugin-istanbul";
export default defineConfig({
server: {
port: 8888,
},
build: {
sourcemap: true
},
plugins: [
replace({
preventAssignment: true,
include: /\/jsonlint-lines-primitives\/lib\/jsonlint.js/,
delimiters: ["", ""],
values: {
"_token_stack:": "",
},
}) as any,
react(),
istanbul({
cypress: true,
requireEnv: false,
nycrcPath: "./.nycrc.json",
forceBuildInstrument: true, //Instrument the source code for cypress runs
}),
],
define: {
global: "window",
},
});