writer-framework icon indicating copy to clipboard operation
writer-framework copied to clipboard

run custom.dev may raise error when started

Open FabienArcellier opened this issue 1 year ago • 1 comments

@ZBMO has a fork that is up-to-date with master, when it go to src/ui and run npm run custom.dev (from a venv) he get this error.

image

node v20.10.0
npm 10.2.3

Solution

Adding the optimizeDeps.esbuildOptions.target has fixed the issue for @ZBMO

src/ui/vite.config.custom.ts

import vue from "@vitejs/plugin-vue";
import writerPlugin from "./viteWriterPlugin";

export default defineConfig({
	base: "./",
	plugins: [vue(), writerPlugin()],
	includeWriterComponentPath: false,
	define: {
		WRITER_LIVE_CCT: JSON.stringify("yes"),
	},
	publicDir: false,
	optimizeDeps: {
		esbuildOptions: {
			target: "es2022",
		},
	},

FabienArcellier avatar Aug 15 '24 06:08 FabienArcellier

Hey @raaymax we'd like to figure out what's a sustainable solution for this and as our resident JS expert we thought you'd be able to figure this out

ramedina86 avatar Aug 26 '24 08:08 ramedina86