Closed dy closed 4 years ago
supporting more constant propagation would be nice but I'm not sure prepack does the kind of "local" propagation that static-module needs. We'd just need to inline the value of eg. a path passed to fs.readFileSync()
but my understanding is that Prepack will partially evaluate the entire module and output a serialized form of that. Is that right?
It sounds like you could maybe run prepack first to inline stuff and then run static-module afterward.
That would allow dynamic paths in require/readFileSync in brfs. Constant propagation is very demanded case