You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user reached out about the compendium library not working. After investigating the issue, it turns out to be caused by the "Better Roll Tables" module being loaded.
The reason for that is because that module apparently creates a exports global variable, which will cause every UMD dependency and build to fail, because it would cause the js umd packages to be installed under exports["pkg"] instead of window["pkg"] making those classes unavailable.
This is what happens when we open the compendium library, it loads the vue dependency component which then gets set in exports["ForgeCompendiumBrowserVue"] instead of being a global variable on window, causing this failure:
and this effect:
There's two actions to do here:
1 - report the issue to that module developer, because I'm sure it will be affecting potentially many other modules that may depend on build umd files or external dependencies
2 - perhaps modify dlopen so that it checks for a exports variable and renames it or keeps track of the variables in it so that when a dependency is loaded, it can copy the new fields into globalThis.window
Possibly do the same thing for the define method if it exists. See UMD format and how it loads dependencies: https://jameshfisher.com/2020/10/04/what-are-umd-modules/
The text was updated successfully, but these errors were encountered:
So further investigation is showing that it is indeed Better Rolltables that is causing the issue... but not intentionally. Nowhere in the code does it specify exports. And it works correctly on a stand alone version, this only seems to be affecting The Forge implementation.
In fact, exports exists within the code well before anything is even loaded, but then at some point on the stand alone version, gets deleted. It looks like on a Forge version, Better Rolltables is not allowing the exports to be deleted properly?
So I'm not entirely sure this is an issue specifically with Better Rolltables, and may be something more with how Foundry handles things.
On further investigation it looks like Sass is the culprit, and Better Rolltables uses Sass. Still unsure why this is an issue on Forge and not on local. And only affects Better Rolltables and not any of the other modules that use Sass.
A user reached out about the compendium library not working. After investigating the issue, it turns out to be caused by the "Better Roll Tables" module being loaded.
The reason for that is because that module apparently creates a
exports
global variable, which will cause every UMD dependency and build to fail, because it would cause the js umd packages to be installed underexports["pkg"]
instead ofwindow["pkg"]
making those classes unavailable.This is what happens when we open the compendium library, it loads the vue dependency component which then gets set in
exports["ForgeCompendiumBrowserVue"]
instead of being a global variable onwindow
, causing this failure:and this effect:
There's two actions to do here:
1 - report the issue to that module developer, because I'm sure it will be affecting potentially many other modules that may depend on build umd files or external dependencies
2 - perhaps modify
dlopen
so that it checks for aexports
variable and renames it or keeps track of the variables in it so that when a dependency is loaded, it can copy the new fields intoglobalThis.window
Possibly do the same thing for the
define
method if it exists. See UMD format and how it loads dependencies:https://jameshfisher.com/2020/10/04/what-are-umd-modules/
The text was updated successfully, but these errors were encountered: