writer-framework
writer-framework copied to clipboard
run custom.dev may raise error when started
@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.
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",
},
},
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