Closed Dazaer closed 1 year ago
There is no mention to process/browser
in this package's sources or build output, so I have no idea where this error could be coming from. What does line 911 in your ./node_modules/@lezer/lr/dist/index.js look like?
// Environment variable used to control console output
const verbose = typeof process != "undefined" && process.env && /\bparse\b/.test(process.env.LOG);
I guess you have some kind of magic in your build process that attemps to inject a polyfill for Node's process
global into the build output because that line references it. The solution would be to find and turn off that magic.
In case anyone else stumbles into this here's what I changed to solved it:
new webpack.ProvidePlugin({
process: 'process/browser'
})
Changing the value to process
or process/browser.js
works the same.
My project is using es6 modules and I'm getting the above error.
I solve it currently by specifying the following in my webpack config:
Am I doing something wrong? Or is this something that has to be implemented/fixed/upgraded on lezer side?