It should automatically not be included if it is not used. We detect which syscalls are invoked, and if none of them are filesystem-related, then filesystem code is not included.
And the node 'fs' module is loaded if we need it to load a file. That can happen due to loading a file package, or a mem init file, or some other supporting file. You can disable those, of course (--memory-init-file 0 for the mem init file, etc.). On Thu, Jun 23, 2016 at 9:46 AM, Gary Pickrell <[email protected]> wrote: > > Thanks, > > Webpack or babel throws the error. I am transcompiling and packaging the > with them. I can't print the state of ENVIRONMENT_IS_NODE because this is > a compilation phase not a run phase. I believe an AST is being created. > > Since the cpp code I have does not use the file system. Is there a way to > disable loading it? > > > -Gary > > On Thursday, June 23, 2016 at 9:19:02 AM UTC-7, Alon Zakai wrote: >> >> What is the code in that stack trace? Who is throwing it? >> >> Emscripten does have one place where it tries to load the node 'fs' >> module. If that's it, then the question is why it thinks it's running in >> node. Look at the ENVIRONMENT_IS_NODE variable to see. >> >> -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
