-
Notifications
You must be signed in to change notification settings - Fork 171
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
V8 #457
V8 #457
Conversation
Thank-you for your efforts @wheresrhys 🙂. It turns out that fdf9d61 solved my immediate problem as described in #419 by making browserify use a compatible version of core-js when bundling fetch-mock. browserify respects the "browser" field so importing "fetch-mock" Just Works although the output is suboptimal. The result of |
I'm not familiar enough with the handling of CJS + ESM modules in different node versions / bundlers to do much of a technical review of the new documentation here, but I appreciate the fact that it exists. As I mentioned above, in our toolchain |
Thanks for the feedback @robertknight. Are you able to tell which entry point your build is picking up? I guess it's Interesting to find the impact of whatwg-url on bundle size - most of the difference in size you're seeing is down to it I think, but it's inclusion is not new, and I actually see a slight reduction in size in v8. Are you seeing the bundle size go up in comparison? |
Tweaked it so it only requires whatwg-url on the server. The |
Thanks, this does solve my issue. And the readme is good too. |
There seems to be a bug somewhere ( project/node_modules/fetch-mock/package.json ...
"main": "./cjs/server.js",
... With PPS: |
@berstend that's strange. This bug did exist briefly - up to alpha.2 I think - but should be fixed by 4eddade. Locally I get everything copied into the root of Does |
That bug with the cjs export is now fixed. No idea why it was broken - both myself and CI run bash, so it's really odd that the same command had different results. |
…o v8 * 'master' of https://github.com/wheresrhys/fetch-mock: lint documented the new behaviour implemented delay behaviour test for delay option
…o types * 'master' of https://github.com/wheresrhys/fetch-mock: lint documented the new behaviour implemented delay behaviour test for delay option
* v8: fix docs
I think I've done a types??
…o unmatched * 'master' of https://github.com/wheresrhys/fetch-mock: improve example's richness split options into sections
Just upgraded to
|
@Dynalon thanks for trying it out. I'd really appreciate a PR onto this branch to fix the typescript issue as I'm not really a typescript aficionado, and I pretty much copied the type defs from DefinitelyTyped unchanged, so not sure how I could have dropped an export |
Forget what I said, it is still exported. I got mixed up with the different kind of module import that v8 brings. Everything fine 👍 |
I tried to use the |
Thanks @MathieuPuech - I will investigate. Can you tell me a bit more about your toolchain? What bundlers, transpilers etc are you using, and in which environment are your tests running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
nudge @MathieuPuech |
I’m using it with es-dev-server |
Fyi es dev server uses https://www.npmjs.com/package/resolve for resolving modules |
Thanks both - I will try to recreate the issue and hopefully address it |
…o v8 * 'master' of https://github.com/wheresrhys/fetch-mock: fix bug in multiple calls of delay Bump lodash from 4.17.10 to 4.17.15 improve example's richness split options into sections
* 'v8' of https://github.com/wheresrhys/fetch-mock: remove MATCHED and UNMATCHED constants updated types to support delay option add new mock() without arguments behaviour to types stop using localTs - I can see why not now. Want max compat add body option to type defs local typescript I think I've done a types??
@MathieuPuech that should be fixed now. It's annoying that es-dev-server prefers module to browser, even when browser points at a .mjs file. I may raise an issue |
It's working when using
|
This
Reviews of the new documentation much appreciated
Note - the latest release is 8.0.0-alpha.10