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
Here's a view of the docs/statistics page currently:
All the pixi modules are double-imported, once for ecma script modules (ESM) and once for commonJS (CJS). This leads to a very large bundle size, because we're effectively importing the entirety of pixi twice. Need to investigate why this is.
The text was updated successfully, but these errors were encountered:
Some google-fu resulted in this page: evanw/esbuild#1950, I will be using it as a template to investigate this issue too.
After turning on 'logLevel: verbose' mode in the esbuild.config.js file, performing a build with node config/esbuild.config.modern.js, and observing the output in a terminal window, I searched for dist/cjs/pixi.js in the output and got the following block:
Read 3 entries for directory
"/Users/clarkben/working/RapiD/node_modules/pixi-dashed-line/dist"
No "browser" map found in directory
"/Users/clarkben/working/RapiD/node_modules/pixi-dashed-line/dist"
Searching for "pixi.js" in "node_modules" directories starting from
"/Users/clarkben/working/RapiD/node_modules/pixi-dashed-line/dist"
Parsed package name "pixi.js" and package subpath "."
Checking for a package in the directory
"/Users/clarkben/working/RapiD/node_modules/pixi.js"
Read 5 entries for directory
"/Users/clarkben/working/RapiD/node_modules/pixi.js"
Looking for "." in "exports" map in
"/Users/clarkben/working/RapiD/node_modules/pixi.js/package.json"
Using the entry for "."
Checking condition map for one of ["browser", "default", "require"]
The key "import" does not apply
The key "require" applies
Checking condition map for one of ["browser", "default", "require"]
The key "types" does not apply
The key "default" applies
Checking path "" against target "./dist/cjs/pixi.js"
Joined "" to "./dist/cjs/pixi.js" to get "./dist/cjs/pixi.js"
The resolved path
"/Users/clarkben/working/RapiD/node_modules/pixi.js/dist/cjs/pixi.js" is exact
Read 3 entries for directory
"/Users/clarkben/working/RapiD/node_modules/pixi.js/dist"
Read 4 entries for directory
"/Users/clarkben/working/RapiD/node_modules/pixi.js/dist/cjs"
Resolved to
"/Users/clarkben/working/RapiD/node_modules/pixi.js/dist/cjs/pixi.js"
Read 4 entries for directory
"/Users/clarkben/working/RapiD/node_modules/pixi.js/dist/cjs"
Primary path is
"/Users/clarkben/working/RapiD/node_modules/pixi.js/dist/cjs/pixi.js" in
namespace "file"
This pretty clearly shows that the pixi-dashed-line module is what is picking up all the .cjs modules. When I comment out all the usage of this particular module (it's only used for drawing halos around hovered features, so this wasn't too difficult- 3 or 4 files) the build stats go back to normal:
In the course of upgrading to v7, I decided to wholly gobble up the pixi-dashed-line repo and rehost / rebuild it with our country-coder techniques as the last release was well over a year ago and there has been no movement on the original repo.
Here's a view of the docs/statistics page currently:
All the pixi modules are double-imported, once for ecma script modules (ESM) and once for commonJS (CJS). This leads to a very large bundle size, because we're effectively importing the entirety of pixi twice. Need to investigate why this is.
The text was updated successfully, but these errors were encountered: