LGraph error when use build mode
Problem:
When dev mode, all is fine. But if I use build for production mode, this error occurs:
TypeError: an.LGraph is not a constructor
Does anyone know about this error?
yarn version 1.10.1 node version v16.13.2 npm version 8.1.2 litegraph.js version 0.7.10 vue version 2.7.7 vite version 3.0.2
Script for dev mode:
"dev": "vite --host"
Script for build production mode:
"build": "vite build"
I am having the same issue. No idea why.
it looks like the names are changed when ofuscating the code, and my lib relies in the class names. can you disable that options?
I tired disabling the minify and to force that library to be included, avoiding any potential pruning. Still, I was not successful. The issue is that vite uses different bundling strategies for the dev and build targets. Build mode relies on rollup which does not work with litegraph.js for some reasons.