Closed TheSavior closed 8 years ago
I'm up for reviewing a PR if you can figure out a solution but can't offer much beyond that. Static analysis is inherently limited and requires parseable syntax. From looking at your other issue the only fix would be to specifically hardcode knowledge of rewire's code generation which I'm not up for doing.
This is a cross post of issue https://github.com/speedskater/babel-plugin-rewire/issues/117 in order for us to figure out how these two modules can not break each other.
Babel-plugin-rewire, in order to support rewriting const variables, modifies the source of files to have every variable access go through a proxy function.
This is breaking proxyquireify's ability to find the requires and add the call to require to get browserify to include the file:
While it is directly babel-plugin-rewire's fault for breaking compatibility with proxyquireify, I'm not sure what the correct approach is. This is a cross post from the issue at babel-plugin-rewire. Reasonable approaches might be to make proxyquireify's detection of requires a little more robust, or to have babel-plugin-rewire support blacklisting certain things.