file_packager should support modularization #22901
takase1121
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
I assume you are running the file_packager tool standalone and then taking the output and using it via I think you are correct that file_packager needs some kind of extra mode here, but it may require user intervention to glue the file_packager code to the module being instantiated. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on bundling files generated by
file_packager
with my emcc-compiled source and some wrapper code with esbuild. I ran into issues of the loader script generated byfile_packager
definingModule
, which clobber the global namespace. I am working around this by wrappingfile_packager
with another script that wraps its output with an CommonJS export. It would be great iffile_packager
also supports something similar to-sMODULARIZE=1
, where it exports a factory function that takes inModule
and spits out anotherModule
.Beta Was this translation helpful? Give feedback.
All reactions