Skip to content
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

fix(core): sub entry export for react-native #1350

Merged
merged 2 commits into from
Jan 19, 2023

Conversation

thekip
Copy link
Collaborator

@thekip thekip commented Jan 19, 2023

Attempt to fix #1347

Node 12+
@lingui/core/compile -> package.json exports -> build/cjs/compile.js

React Native or other older CJS runtimes not supporting exports:
@lingui/core/compile -> /compile.js -> build/cjs/compile.js

Development: Jest + Typescript Language Server
@lingui/core/compile -> tsconfig path mapping -> src/compile/index.ts

Guys, i'm on vacation till Monday, i haven't chance to test it with verdacio + /examples, i assume it would work, but better to test

@vercel
Copy link

vercel bot commented Jan 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 19, 2023 at 0:08AM (UTC)

@github-actions
Copy link

github-actions bot commented Jan 19, 2023

size-limit report 📦

Path Size
./packages/core/build/esm/index.js 2.89 KB (0%)
./packages/detect-locale/build/esm/index.js 804 B (0%)
./packages/react/build/esm/index.js 2.61 KB (0%)
./packages/remote-loader/build/esm/index.js 7.37 KB (0%)

@thekip thekip changed the title fix(core) sub entry export for react-native fix(core): sub entry export for react-native Jan 19, 2023
@Martin005 Martin005 self-requested a review January 19, 2023 08:59
@Martin005 Martin005 self-assigned this Jan 19, 2023
@Martin005
Copy link
Contributor

Martin005 commented Jan 19, 2023

Can confirm that this PR fixes the React Native and Bundlephobia (tested locally)! 👍

packages/core/compile.js Outdated Show resolved Hide resolved
Co-authored-by: Martin Chrástek <chrastek12@gmail.com>
@andrii-bodnar
Copy link
Contributor

@thekip @Martin005 thank you!

@andrii-bodnar andrii-bodnar merged commit c178ce3 into lingui:main Jan 19, 2023
@thekip thekip deleted the fix/compiler-entry-for-react-native branch January 19, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find module '@lingui/core/compile'
3 participants