jailed
jailed copied to clipboard
Is there any way to import third party node module/lib to sandbox?
If the loaded code in sandbox requires some dependency/lib, is there any way to import the libs to sandbox for the code to use?
What I do is loading the third party library as text (with webpack, in my case) and inject it in the wrapper code. You can't normally access the DOM or window object, though, at least in the browser, so be prepared to mock stuff :)
And I guess this is a duplicate of https://github.com/asvd/jailed/issues/23