Skip to content

Commit

Permalink
try to fix conditional exports in package.json #1634
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Apr 24, 2023
1 parent 787b2f9 commit b74ffdf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 12.2.2

- try to fix conditional exports in package.json

### 12.2.1

- type fix: the type of defaultNS in I18nextProvider should support string[] [1633](https://github.com/i18next/react-i18next/pull/1633)
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@
"./package.json": "./package.json",
".": {
"types": "./index.d.ts",
"module": "./dist/es/index.js",
"import": "./dist/es/index.js",
"require": "./dist/commonjs/index.js"
"require": "./dist/commonjs/index.js",
"default": "./dist/es/index.js"
},
"./TransWithoutContext": {
"types": "./TransWithoutContext.d.ts",
"module": "./dist/es/TransWithoutContext.js",
"import": "./dist/es/TransWithoutContext.js",
"require": "./dist/commonjs/TransWithoutContext.js"
"require": "./dist/commonjs/TransWithoutContext.js",
"default": "./dist/es/TransWithoutContext.js"
},
"./initReactI18next": {
"types": "./initReactI18next.d.ts",
"module": "./dist/es/initReactI18next.js",
"import": "./dist/es/initReactI18next.js",
"require": "./dist/commonjs/initReactI18next.js"
"require": "./dist/commonjs/initReactI18next.js",
"default": "./dist/es/initReactI18next.js"
}
},
"homepage": "https://github.com/i18next/react-i18next",
Expand Down
14 changes: 4 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ export { Translation } from './Translation.js';
export { I18nextProvider } from './I18nextProvider.js';
export { withSSR } from './withSSR.js';
export { useSSR } from './useSSR.js';
export { initReactI18next } from './initReactI18next.js';
export { setDefaults, getDefaults } from './defaults.js';
export { setI18n, getI18n } from './i18nInstance.js';

export {
I18nContext,
initReactI18next,
setDefaults,
getDefaults,
setI18n,
getI18n,
composeInitialProps,
getInitialProps,
} from './context.js';
export { I18nContext, composeInitialProps, getInitialProps } from './context.js';

// dummy functions for icu.macro support

Expand Down

0 comments on commit b74ffdf

Please sign in to comment.