Files
editor/vite.config.ts
ShellyDCMS a324ddb654 add code coverage (#852)
Add Cypress code coverage using Istanbul nyc

![image](https://github.com/maputnik/editor/assets/60476837/e7c364b7-7b54-4bf1-85aa-ee6fb19cc40c)

---------

Co-authored-by: shelly_goldblit <shelly_goldblit@dell.com>
Co-authored-by: Harel M <harel.mazor@gmail.com>
2023-12-26 12:04:43 +02: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",
},
});