Excuse me if I'm off track. I am upgrading my AFrame project from Webpack4 to Webpack5, however, Webpack5 removes polyfill for node modules including node.process, which is used a couple of places in the aframe code, for example
This makes it so i have to polyfill support to continue using Aframe.
I've seen other projects and comments elsewhere mention that process.browser is unsafe or should not be used in frontend libraries, or libraries that have changed the check to for example if (typeof window !== "undefined"). I'm not sure about these claims and have little experience with Webpack/Node on this level.
Not sure if this applies to Aframe, but I wanted to raise the question here and see if someone has any thoughs about it.
Description:
Excuse me if I'm off track. I am upgrading my AFrame project from Webpack4 to Webpack5, however, Webpack5 removes polyfill for node modules including node.process, which is used a couple of places in the aframe code, for example
https://github.com/aframevr/aframe/blob/f029cfa187c086863ebcd863d50282e1f4833bec/src/utils/device.js#L183 https://github.com/aframevr/aframe/blob/f029cfa187c086863ebcd863d50282e1f4833bec/src/utils/debug.js#L90
This makes it so i have to polyfill support to continue using Aframe.
I've seen other projects and comments elsewhere mention that process.browser is unsafe or should not be used in frontend libraries, or libraries that have changed the check to for example
if (typeof window !== "undefined")
. I'm not sure about these claims and have little experience with Webpack/Node on this level.Not sure if this applies to Aframe, but I wanted to raise the question here and see if someone has any thoughs about it.