adjust check for node env to handle webpack\browserify#4308
Conversation
|
👍 |
|
Hey, this looks good. I did some tests with loading in browser as a script, bundling with webpack and bundling with browserify. The good news is the change to check Browserify by default shims the webpack does not shim the ... this would essentially say "If any bundlers try to include this for the browser, ignore any attempts to import the 'fs', 'os' and 'path' modules". I tested this and it worked beautifully. It causes webpack and browserify to have the same default behavior, which is that the various calls to import
|
|
@jbrantly is there a different check that would succeeded with browserify but fail for webpack that we should be using instead? |
|
@mhegazy Not sure I understand. The |
|
@mhegazy there are actually two places where typescript behave incorrectly when it was used with webpack.
|
|
This looks good from my perspective. Even though I don't use TypeScript like this I am a big fan of webpack so I think it's really cool that you guys support this scenario. Thanks! |
adjust check for node env to handle webpack\browserify
fixes #3488