-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: chore reduce size of esm packages
- Loading branch information
Sergio Moreno
committed
May 18, 2021
1 parent
f95a467
commit 3d9ddb1
Showing
4 changed files
with
4 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1 @@ | ||
import { | ||
i18n as i18nProd, | ||
setupI18n as setupI18nProd, | ||
formats as formatsProd, | ||
I18n as I18nProd | ||
} from './dev.production.min'; | ||
|
||
import { | ||
i18n as i18nDev, | ||
setupI18n as setupI18nDev, | ||
formats as formatsDev, | ||
I18n as I18nDev | ||
} from './dev.development'; | ||
|
||
export const i18n = process.env.NODE_ENV === 'production' ? i18nProd : i18nDev; | ||
export const setupI18n = process.env.NODE_ENV === 'production' ? setupI18nProd : setupI18nDev; | ||
export const formats = process.env.NODE_ENV === 'production' ? formatsProd : formatsDev; | ||
export const I18n = process.env.NODE_ENV === 'production' ? I18nProd : I18nDev; | ||
export * from './dev.development'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1 @@ | ||
import { | ||
i18n as i18nProd, | ||
setupI18n as setupI18nProd, | ||
formats as formatsProd, | ||
I18n as I18nProd | ||
} from './core.production.min'; | ||
|
||
import { | ||
i18n as i18nDev, | ||
setupI18n as setupI18nDev, | ||
formats as formatsDev, | ||
I18n as I18nDev | ||
} from './core.development'; | ||
|
||
export const i18n = process.env.NODE_ENV === 'production' ? i18nProd : i18nDev; | ||
export const setupI18n = process.env.NODE_ENV === 'production' ? setupI18nProd : setupI18nDev; | ||
export const formats = process.env.NODE_ENV === 'production' ? formatsProd : formatsDev; | ||
export const I18n = process.env.NODE_ENV === 'production' ? I18nProd : I18nDev; | ||
export * from './core.development'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1 @@ | ||
import { | ||
detect as detectDev, | ||
fromCookie as fromCookieDev, | ||
fromHtmlTag as fromHtmlTagDev, | ||
fromNavigator as fromNavigatorDev, | ||
fromPath as fromPathDev, | ||
fromStorage as fromStorageDev, | ||
fromSubdomain as fromSubdomainDev, | ||
fromUrl as fromUrlDev, | ||
multipleDetect as multipleDetectDev, | ||
} from "./detect-locale.development.js" | ||
|
||
import { | ||
detect as detectProd, | ||
fromCookie as fromCookieProd, | ||
fromHtmlTag as fromHtmlTagProd, | ||
fromNavigator as fromNavigatorProd, | ||
fromPath as fromPathProd, | ||
fromStorage as fromStorageProd, | ||
fromSubdomain as fromSubdomainProd, | ||
fromUrl as fromUrlProd, | ||
multipleDetect as multipleDetectProd, | ||
} from "./detect-locale.production.min.js" | ||
|
||
export const detect = process.env.NODE_ENV === "production" ? detectProd : detectDev; | ||
export const fromCookie = process.env.NODE_ENV === "production" ? fromCookieProd : fromCookieDev; | ||
export const fromHtmlTag = process.env.NODE_ENV === "production" ? fromHtmlTagProd : fromHtmlTagDev; | ||
export const fromNavigator = process.env.NODE_ENV === "production" ? fromNavigatorProd : fromNavigatorDev; | ||
export const fromPath = process.env.NODE_ENV === "production" ? fromPathProd : fromPathDev; | ||
export const fromStorage = process.env.NODE_ENV === "production" ? fromStorageProd : fromStorageDev; | ||
export const fromSubdomain = process.env.NODE_ENV === "production" ? fromSubdomainProd : fromSubdomainDev; | ||
export const fromUrl = process.env.NODE_ENV === "production" ? fromUrlProd : fromUrlDev; | ||
export const multipleDetect = process.env.NODE_ENV === "production" ? multipleDetectProd : multipleDetectDev; | ||
export * from "./detect-locale.development" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
import { | ||
I18nProvider as devI18nProvider, Trans as devTrans, useLingui as devuseLingui, withI18n as devwithI18n | ||
} from "./react.development.js" | ||
|
||
import { | ||
I18nProvider as I18nProviderProd, Trans as TransProd, useLingui as useLinguiProd, withI18n as withI18nProd | ||
} from "./react.production.min.js" | ||
|
||
export const I18nProvider = process.env.NODE_ENV === "production" ? I18nProviderProd : devI18nProvider; | ||
export const Trans = process.env.NODE_ENV === "production" ? TransProd : devTrans; | ||
export const useLingui = process.env.NODE_ENV === "production" ? useLinguiProd : devuseLingui; | ||
export const withI18n = process.env.NODE_ENV === "production" ? withI18nProd : devwithI18n; | ||
export * from "./react.development"; |