First of all link to the issue
https://stackblitz.com/edit/vue3-script-setup-with-vite-mx4xx2?file=package.json
To reproduce the problem run command
npm run build
Then you get error in logs
transforming (119) node_modules/lodash/_hashDelete.js'emitter' is imported by emitter?commonjs-external, but could not be resolved – treating it as an external dependency
Trying to run npm run serve gives console error
Uncaught TypeError: Failed to resolve module specifier "emitter". Relative references must start with either "/", "./", or "../".
I know this error is caused by package geostyler-sld-parser, specificaly this line in App.vue
const sldParser = new SLDParser()
I need this package and run build/serve successfully, anyone knows how to configure vite correctly? I tried some plugins but nothing worked so far.