Closed rkaiser0324 closed 6 years ago
Mr uses a naive require
parser for speed in the browser. In Mop we could do a real parse and AST traverse using Esprima.
We could also filter the dependency list for non-extant files.
@stuk, the way I see this issue is that
Or, we keep to the status quo indefinitely.
What do you think?
I need to check to see if an error happens when mopping with a commented require. If no error occurs then I'm fine leaving this case as is for the moment, and improving the documentation to make note of it.
If this issue gets more +1s then we can spend some time making parseDependencies
work with Esprima in Mop.
Related to https://github.com/montagejs/mr/issues/12
Fixed in mr
If a
require()
exists in a comment it should be ignored for the purposes of building, but it's not. E.g.,But when you build it you'll get a runtime error looking for foo.js.