-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Add support for .mjs extension from dependencies (such as graphql) #4642
Conversation
Also I just noticed there's been some auto-formatting committed, if you're unhappy with it I'll be happy to remove it |
Why does this fix work? Why not include everything and only |
Per your comment here (#4637 (comment)) it seems this isn't a bug that needs fixed. |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
i messed up the autoformatting a while ago, it's ok to include it. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@Timer I'm a bit confused about your not needing fixed comment, my comment on #4637 (comment) is implying that this is still an issue that needs addressed, I tried the suggested steps and due to semver issues with the sha in the package version it installed a previous version of I've provided an explanation as to why the issue is being caused in the issue The solution that I am proposing in this PR is to change the default behaviour in Webpack 4 of how it treats While I suspect the The change that I've made in the webpack config instructs webpack to treat I believe doing so will result in a smoother 2.0 milestone release for At least until |
Also, I struggled to get the tests to run on my machine but hoped CI would be more reliable, but it looks like PRs being raised for a simple documentation change is breaking CI. Are the tests currently Thanks |
This looks more like a webpack bug, can we report it there? |
@Timer I'm in the process of narrowing down the issue with either However I believe it still makes sense to include the config to mitigate the issue (and possible future ones) in the mean time to prevent blocking the |
Looking at the source makes graphql look fine: https://unpkg.com/[email protected]/jsutils/instanceOf.mjs And not necessarily, if this is a webpack bug it will be fixed before the 2.0 release and the 2.0 is probably 2-3 months away still. |
We dropped all |
Here is the fix for supporting
.mjs
files from dependencies referenced here: #4637I've verified the changes both before and after, here's the after screenshot:
I tried writing some tests for the
.mjs
support but failed to get the e2e docker tests running on my local machine after following this guide (was failing with user permissions?)I'm hoping that CI will pick it up and run smoothly, if not I'd really appreciate some help in getting the tests to run locally 👍