Open tolmasky opened 7 years ago
Changing singleOnly to false seems to resolve this issue.
I think that was a concession to make babel work. Babel probably isn't necessary for this anymore. PR?
Just to clarify, would you like me to just change singleOnly to false, or also remove babel?
Both. If singleOnly is false but babel is still in, it'll be transpiling every module you require, which might end up being very bad.
As a question, why is sandboxed-module used at all? Is there an actual thing being protected against? In my experiments it is very difficult to get it to behave correctly using it at all, but if I just require the file it's fine.
The whole idea was to allow template tag syntax before it was supported in node. Using sandboxed-module allowed that through babel, but now that node supports it, there isn't much reason to keep using either sandboxed-module or babel. I'm not exactly sure how to pull it out but, if you can, go for it.
OK, I've removed it. Again, I bumped up the version since it's a breaking change, but not sure how to handle that.
If you have code like this:
The second require appears to be not sandboxed while the first is. Not sure, but they are certainly different and this results false.