Closed connorlindsey closed 6 months ago
Affects CRA using knocklabs/react ``` Module not found: Error: Can't resolve 'date-fns/locale' in '/Users/connor/Dev/knock/test/cra-install-test/node_modules/knocklabs/react-core/dist/esm/modules/core/context' Did you mean 'index.js'? BREAKING CHANGE: The request 'date-fns/locale' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. ``` > react-notification-feed uses `"babel-plugin-date-fns"`
Latest commit: 1af536be44a3b52d588092e4354bd43e2ddcdf4e
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
babel-plugin-date-fns
for compatibility with@knocklabs/react-notification-feed
react-core
to output.js
files for the esm build and updates the exports to fix an issue with Webpack 5. Before these changes, using the react packages in a CRA app would cause the following error:For some background, here's an example of the same issue in React Spring: https://github.com/pmndrs/react-spring/pull/2101