-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
v3 beta build issues #1371
Comments
Essentially, the |
FYI, I finally find what's wrong with my tests: To fix my tests, I need to do:
If you are working on monorepo and have
@redonkulus, @DragonRaider5, @longlho, Maybe we want to mention this in our upgrade guide, I'm pretty sure many people will start to complain on this once v3 come out... I will try to submit a PR once my company's project get fixed. |
Thanks, at least that solved the 2nd issue running tests. I actually tried But I still have the first issue running a build which makes sense because I set up webpack to not use the babel loader for node_modules. What is the recommended setup here? Strangely enough running a local development server works since the error comes from UglifyJsPlugin specifically. I know that plugin is outdated but don't want to update webpack in the same PR as updating react-intl because the PR is already getting kinda big for a proper review... unless there is no other way of course. tl;dr edit Solved for now (but if I'm doing it wrong please let me know) by adding include: [
path.join(__dirname, "src"),
path.join(__dirname, "node_modules/react-intl"),
], |
I opened a PR to fix the compilation of |
By the time you can use this resolution in package.json (assuming you are using yarn): "resolutions": {
"intl-messageformat": "5.0.0"
} |
Can't |
Thanks for submitting the issue. I'll update the Upgrade Guide to account for the ESM module exports. In general ESM/CJS interop is very troublesome (webpack/rollup/parcel/build toolchain do things differently, esp for namespace import) and we're leaning towards exporting ESM only. |
This problem is not only on module bundlers. This component can be used even on the server as SSR. |
I also encountered similar problem while running Jest + Enzyme tests in my React application. I am using CRA and did not eject, therefore I needed to modify the CRA does not support to provide this parameter via package.json directly. Package supporters are hesitating to add this support: facebook/create-react-app#2943 (comment) Are there any plans to fix this to work out of the box? |
Looks like the modification above is not necessary in |
Still getting this error in |
This isn't working for me in a monorepo setup for react-intl 3.3.2, which seems to be a caveat as per https://yarnpkg.com/lang/en/docs/selective-version-resolutions/#toc-limitations-Caveats. I followed the upgrade guide for ESM exports here https://github.com/formatjs/react-intl/blob/master/docs/Upgrade-Guide.md#esm-build but still no joy... |
I'm getting the following build error when using
react-intl@3.0.0-beta.18
:Which is
In addition, starting from
react-intl@3.0.0-beta.16
I'm getting this error when running tests (Jest + Enzyme):It's not directly coming from
react-intl
but at least it's coming from a dependency which is upgraded inreact-intl@3.0.0-beta.16
.If these are known issues I'm sorry for creating this bug report.
The text was updated successfully, but these errors were encountered: