Skip to content

Commit

Permalink
Small fixes to packages.json for react-native compat
Browse files Browse the repository at this point in the history
React Native's Metro bundler expects all imports to be declared in the `exports` attribute when there is one defined. Lingui imports it (to get the version I guess?) and Metro refuses it as it was not defined as a valid export.
See eemeli/make-plural#15 for a similar issue on the `make-plural` package

The `main` field for `@babel/macro` was also incorrect as there is no `index.ts` in this project.
  • Loading branch information
renchap committed Mar 7, 2021
1 parent b3d657c commit 6364b9e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions packages/core/package.json
Expand Up @@ -29,8 +29,11 @@
"node": ">=10.0.0"
},
"exports": {
"require": "./index.js",
"import": "./esm/index.js"
".": {
"require": "./index.js",
"import": "./esm/index.js"
},
"./package.json": "./package.json"
},
"files": [
"LICENSE",
Expand Down
7 changes: 5 additions & 2 deletions packages/detect-locale/package.json
Expand Up @@ -29,8 +29,11 @@
"node": ">=10.0.0"
},
"exports": {
"require": "./index.js",
"import": "./esm/index.js"
".": {
"require": "./index.js",
"import": "./esm/index.js"
},
"./package.json": "./package.json"
},
"files": [
"LICENSE",
Expand Down
2 changes: 1 addition & 1 deletion packages/macro/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "@lingui/macro",
"version": "3.7.0",
"description": "Macro for generating messages in ICU MessageFormat syntax",
"main": "index.ts",
"main": "index.js",
"author": {
"name": "Tom谩拧 Ehrlich",
"email": "tomas.ehrlich@gmail.com"
Expand Down

0 comments on commit 6364b9e

Please sign in to comment.