-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update virtualfs dependency #54
Conversation
Oh that's embarassing. I'll check it tonight. |
My tests show that this is occurring because moving from 1.x to 2.x, I added:
To the It appears that your current webpack builder is building using the If I run If I try to do
Which isn't an error of js-virtualfs, but an error within babel or rollup. At any case while I investigate why rollup/babel is creating a bad UMD bundle of the code, I think the webpack bundler you have shouldn't be using the browser export target. It should be using the main cjs target or module target since webpack should recognise ES6 modules. |
Aha. I think I found the source of the error, in my upstream dependency: rvagg/node-errno#17. And also this calvinmetcalf/rollup-plugin-node-builtins#31 from rollup. I updated errno which fixes the strictness issue. However the rollup issue is still a problem. However there is actually another problem with the browser target. The node-process polyfill for process doesn't fully specify the platform property, this PR still hasn't been merged defunctzombie/node-process#82. The best solution right now is to make sure that webpack isn't using the browser target. The benchmark is meant to be used with nodejs anyway. |
Thanks for digging into this, @CMCDragonkai!
The Web Tooling Benchmark is kind of a special case, in that the generated benchmark should also run in browsers. |
c4b8ad6
to
96aba3a
Compare
These 2 issues are tracking upstream issues before this problem can be fixed:
I just reread the README, and I can see that the benchmark can be used from the browser as well. My original thinking for downstream users who were bundling for browsers as well, are still supposed to use the main/module targets and build in the polyfills at their bundling stage, rather than relying on the upstream browser target which already embeds polyfills that may not be suitable for downstream environment (due to code duplication...). |
I've released 2.1.0 and I have ran the
I had to swap all the polyfills to rollup plugin based rather than explicit dev dependencies. |
Closes #53.
96aba3a
to
5d8a0ab
Compare
@CMCDragonkai Thanks for your work on this! |
@CMCDragonkai When updating to [email protected] as suggested in #53, the generated benchmark fails to run:
The offending line is part of
virtualfs/dist/index.browser.umd.js
. Would you be open to changing this to add strict mode support?