antlr4ts
antlr4ts copied to clipboard
Webpack 5 - AntlrTS in Browser
Since webpack release to v5, some required lib for browser running are missing:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
Is it possible to add util
, assert
and process
to the antlr4ts bundle?
I faced with the same issue. Is there WA?
At this point, I added react-app-rewired
to my React app to override Webpack config adding these packages, but I don't find it very nice.
see #549 - not sure though if this is caused be the antlr runtime itself