File tree Expand file tree Collapse file tree 7 files changed +48
-52
lines changed Expand file tree Collapse file tree 7 files changed +48
-52
lines changed Original file line number Diff line number Diff line change 11import { initFeatureFlags } from './misc'
22
3- export {
3+ export { createCompileError } from '@intlify/message-compiler'
4+ export type {
45 CompileError ,
56 CompileErrorCodes ,
6- createCompileError ,
77 ResourceNode
88} from '@intlify/message-compiler'
99export * from './compilation'
1010export * from './context'
1111export * from './datetime'
1212export * from './devtools'
13- export {
14- CORE_ERROR_CODES_EXTEND_POINT ,
15- CoreError ,
16- CoreErrorCodes ,
17- createCoreError
18- } from './errors'
13+ export { CORE_ERROR_CODES_EXTEND_POINT , createCoreError } from './errors'
14+ export type { CoreError , CoreErrorCodes } from './errors'
1915export * from './fallbacker'
2016export * from './number'
2117export * from './resolver'
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ if (__ESM_BUNDLER__ && !__TEST__) {
1313// register message compiler at petite-vue-i18n
1414registerMessageCompiler ( compile )
1515
16- export {
16+ export type {
1717 CompileError ,
1818 DateTimeOptions ,
1919 FallbackLocale ,
@@ -47,7 +47,7 @@ export {
4747 RemovedIndexResources ,
4848 TranslateOptions
4949} from '@intlify/core-base'
50- export {
50+ export type {
5151 Composer ,
5252 ComposerCustom ,
5353 ComposerDateTimeFormatting ,
@@ -66,20 +66,19 @@ export {
6666 MissingHandler ,
6767 VueMessageType
6868} from '../../vue-i18n-core/src/composer'
69- export {
69+ export { createI18n , useI18n } from '../../vue-i18n-core/src/i18n'
70+ export type {
7071 ComposerAdditionalOptions ,
7172 ComposerExtender ,
72- createI18n ,
7373 ExportedGlobalComposer ,
7474 I18n ,
7575 I18nAdditionalOptions ,
7676 I18nMode ,
7777 I18nOptions ,
7878 I18nScope ,
79- useI18n ,
8079 UseI18nOptions
8180} from '../../vue-i18n-core/src/i18n'
82- export {
81+ export type {
8382 Choice ,
8483 DateTimeFormatResult ,
8584 LocaleMessageObject ,
@@ -95,9 +94,9 @@ export {
9594 VueI18nTranslation ,
9695 WarnHtmlInMessageLevel
9796} from '../../vue-i18n-core/src/legacy'
98- export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
97+ export type { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
9998export { VERSION } from './../../vue-i18n-core/src/misc'
100- export { Disposer } from './../../vue-i18n-core/src/types'
99+ export type { Disposer } from './../../vue-i18n-core/src/types'
101100
102101export type {
103102 IsEmptyObject ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ if (__ESM_BUNDLER__ && !__TEST__) {
1313// register message compiler for jit compilation
1414registerMessageCompiler ( compile )
1515
16- export {
16+ export type {
1717 CompileError ,
1818 DateTimeOptions ,
1919 FallbackLocale ,
@@ -46,7 +46,7 @@ export {
4646 RemovedIndexResources ,
4747 TranslateOptions
4848} from '@intlify/core-base'
49- export {
49+ export type {
5050 Composer ,
5151 ComposerCustom ,
5252 ComposerDateTimeFormatting ,
@@ -65,20 +65,19 @@ export {
6565 MissingHandler ,
6666 VueMessageType
6767} from '../../vue-i18n-core/src/composer'
68- export {
68+ export { createI18n , useI18n } from '../../vue-i18n-core/src/i18n'
69+ export type {
6970 ComposerAdditionalOptions ,
7071 ComposerExtender ,
71- createI18n ,
7272 ExportedGlobalComposer ,
7373 I18n ,
7474 I18nAdditionalOptions ,
7575 I18nMode ,
7676 I18nOptions ,
7777 I18nScope ,
78- useI18n ,
7978 UseI18nOptions
8079} from '../../vue-i18n-core/src/i18n'
81- export {
80+ export type {
8281 Choice ,
8382 DateTimeFormatResult ,
8483 LocaleMessageObject ,
@@ -94,9 +93,9 @@ export {
9493 VueI18nTranslation ,
9594 WarnHtmlInMessageLevel
9695} from '../../vue-i18n-core/src/legacy'
97- export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
96+ export type { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
9897export { VERSION } from './../../vue-i18n-core/src/misc'
99- export { Disposer } from './../../vue-i18n-core/src/types'
98+ export type { Disposer } from './../../vue-i18n-core/src/types'
10099
101100export type {
102101 IsEmptyObject ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { setDevToolsHook } from '@intlify/core-base'
22import { getGlobalThis } from '@intlify/shared'
33import { initDev , initFeatureFlags } from './misc'
44
5- export {
5+ export type {
66 CompileError ,
77 DateTimeOptions ,
88 FallbackLocale ,
@@ -36,7 +36,7 @@ export {
3636 SchemaParams ,
3737 TranslateOptions
3838} from '@intlify/core-base'
39- export {
39+ export type {
4040 BaseFormatProps ,
4141 ComponentI18nScope ,
4242 DatetimeFormat ,
@@ -50,7 +50,7 @@ export {
5050 Translation ,
5151 TranslationProps
5252} from './components'
53- export {
53+ export type {
5454 Composer ,
5555 ComposerCustom ,
5656 ComposerDateTimeFormatting ,
@@ -69,21 +69,20 @@ export {
6969 MissingHandler ,
7070 VueMessageType
7171} from './composer'
72- export {
72+ export { createI18n , useI18n } from './i18n'
73+ export type {
7374 ComposerAdditionalOptions ,
7475 ComposerExtender ,
75- createI18n ,
7676 ExportedGlobalComposer ,
7777 I18n ,
7878 I18nAdditionalOptions ,
7979 I18nInjectionKey ,
8080 I18nMode ,
8181 I18nOptions ,
8282 I18nScope ,
83- useI18n ,
8483 UseI18nOptions
8584} from './i18n'
86- export {
85+ export type {
8786 Choice ,
8887 DateTimeFormatResult ,
8988 LocaleMessageObject ,
@@ -100,8 +99,8 @@ export {
10099 WarnHtmlInMessageLevel
101100} from './legacy'
102101export { VERSION } from './misc'
103- export { I18nPluginOptions } from './plugin'
104- export { Disposer } from './types'
102+ export type { I18nPluginOptions } from './plugin'
103+ export type { Disposer } from './types'
105104
106105export type {
107106 IsEmptyObject ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ registerMessageResolver(resolveValue)
2323// register fallback locale at vue-i18n
2424registerLocaleFallbacker ( fallbackWithLocaleChain )
2525
26- export {
26+ export type {
2727 CompileError ,
2828 DateTimeOptions ,
2929 FallbackLocale ,
@@ -55,7 +55,7 @@ export {
5555 RemovedIndexResources ,
5656 TranslateOptions
5757} from '@intlify/core-base'
58- export {
58+ export type {
5959 BaseFormatProps ,
6060 ComponentI18nScope ,
6161 DatetimeFormat ,
@@ -69,7 +69,7 @@ export {
6969 Translation ,
7070 TranslationProps
7171} from '../../vue-i18n-core/src/components'
72- export {
72+ export type {
7373 Composer ,
7474 ComposerCustom ,
7575 ComposerDateTimeFormatting ,
@@ -88,21 +88,20 @@ export {
8888 MissingHandler ,
8989 VueMessageType
9090} from '../../vue-i18n-core/src/composer'
91- export {
91+ export { createI18n , useI18n } from '../../vue-i18n-core/src/i18n'
92+ export type {
9293 ComposerAdditionalOptions ,
9394 ComposerExtender ,
94- createI18n ,
9595 ExportedGlobalComposer ,
9696 I18n ,
9797 I18nAdditionalOptions ,
9898 I18nInjectionKey ,
9999 I18nMode ,
100100 I18nOptions ,
101101 I18nScope ,
102- useI18n ,
103102 UseI18nOptions
104103} from '../../vue-i18n-core/src/i18n'
105- export {
104+ export type {
106105 Choice ,
107106 DateTimeFormatResult ,
108107 LocaleMessageObject ,
@@ -118,9 +117,9 @@ export {
118117 VueI18nTranslation ,
119118 WarnHtmlInMessageLevel
120119} from '../../vue-i18n-core/src/legacy'
121- export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
120+ export type { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
122121export { VERSION } from './../../vue-i18n-core/src/misc'
123- export { Disposer } from './../../vue-i18n-core/src/types'
122+ export type { Disposer } from './../../vue-i18n-core/src/types'
124123
125124export type {
126125 IsEmptyObject ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ registerMessageResolver(resolveValue)
2323// register fallback locale at vue-i18n
2424registerLocaleFallbacker ( fallbackWithLocaleChain )
2525
26- export {
26+ export type {
2727 CompileError ,
2828 DateTimeOptions ,
2929 FallbackLocale ,
@@ -54,7 +54,7 @@ export {
5454 RemovedIndexResources ,
5555 TranslateOptions
5656} from '@intlify/core-base'
57- export {
57+ export type {
5858 BaseFormatProps ,
5959 ComponentI18nScope ,
6060 DatetimeFormat ,
@@ -68,7 +68,7 @@ export {
6868 Translation ,
6969 TranslationProps
7070} from '../../vue-i18n-core/src/components'
71- export {
71+ export type {
7272 Composer ,
7373 ComposerCustom ,
7474 ComposerDateTimeFormatting ,
@@ -87,21 +87,20 @@ export {
8787 MissingHandler ,
8888 VueMessageType
8989} from '../../vue-i18n-core/src/composer'
90- export {
90+ export { createI18n , useI18n } from '../../vue-i18n-core/src/i18n'
91+ export type {
9192 ComposerAdditionalOptions ,
9293 ComposerExtender ,
93- createI18n ,
9494 ExportedGlobalComposer ,
9595 I18n ,
9696 I18nAdditionalOptions ,
9797 I18nInjectionKey ,
9898 I18nMode ,
9999 I18nOptions ,
100100 I18nScope ,
101- useI18n ,
102101 UseI18nOptions
103102} from '../../vue-i18n-core/src/i18n'
104- export {
103+ export type {
105104 Choice ,
106105 DateTimeFormatResult ,
107106 LocaleMessageObject ,
@@ -117,9 +116,9 @@ export {
117116 VueI18nTranslation ,
118117 WarnHtmlInMessageLevel
119118} from '../../vue-i18n-core/src/legacy'
120- export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
119+ export type { I18nPluginOptions } from '../../vue-i18n-core/src/plugin'
121120export { VERSION } from './../../vue-i18n-core/src/misc'
122- export { Disposer } from './../../vue-i18n-core/src/types'
121+ export type { Disposer } from './../../vue-i18n-core/src/types'
123122
124123export type {
125124 IsEmptyObject ,
Original file line number Diff line number Diff line change @@ -144,7 +144,9 @@ export function createConfigsForPackage({
144144 process . env . __DEV__ === 'false' ||
145145 / \. p r o d \. [ c m ] ? j s $ / . test ( String ( output . file ) || '' )
146146 const isBundlerESMBuild = / m j s / . test ( format )
147- const isBrowserESMBuild = / b r o w s e r / . test ( format )
147+ const isBrowserESMBuild =
148+ / b r o w s e r / . test ( format ) && ! packageOptions . enableNonBrowserBranches
149+ // const isCJSBuild = format === 'cjs'
148150 const isNodeBuild =
149151 String ( output . file ) . includes ( '.node.' ) ||
150152 format === 'cjs' ||
@@ -157,6 +159,9 @@ export function createConfigsForPackage({
157159 output . sourcemap = sourceMap
158160 output . banner = banner
159161 output . externalLiveBindings = false
162+ // if (isCJSBuild) {
163+ // output.esModule = true
164+ // }
160165 if (
161166 name === 'vue-i18n' ||
162167 name === 'vue-i18n-core' ||
You can’t perform that action at this time.
0 commit comments