Skip to content
This repository was archived by the owner on Jul 4, 2021. It is now read-only.

Commit 4f2efd7

Browse files
authored
breaking: remove runtimeOption (#43)
1 parent feda963 commit 4f2efd7

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,6 @@ About details, See the below section
154154
155155
Note `json` resources matches this option, it will be handled **before the internal json plugin of Vite, and will not be processed afterwards**, else the option doesn't match, the Vite side will handle.
156156
157-
### `runtimeOnly`
158-
159-
- **Type:** `boolean`
160-
- **Default:** `true`
161-
162-
Whether or not to use Vue I18n **runtime-only**, set in the `vue-i18n` field of Vite `alias` option.
163-
164-
If `false` is specified, Vue I18n (vue-i18n) package.json `module` field will be used.
165-
166-
For more details, See [here](https://vue-i18n-next.intlify.dev/advanced/optimization.html#improve-performance-and-reduce-bundle-size-with-runtime-build-only)
167-
168157
### `compositionOnly`
169158
170159
- **Type:** `boolean`

src/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ function pluginI18n(
2828
debug('plugin options:', options)
2929

3030
const filter = createFilter(options.include)
31-
const runtimeOnly = isBoolean(options.runtimeOnly)
32-
? options.runtimeOnly
33-
: true
3431
const compositionOnly = isBoolean(options.compositionOnly)
3532
? options.compositionOnly
3633
: true
@@ -46,12 +43,6 @@ function pluginI18n(
4643
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4744
const partialConfig: any = { define: {}, alias: {} }
4845

49-
if (runtimeOnly) {
50-
partialConfig.alias['vue-i18n'] =
51-
'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
52-
debug('set vue-i18n alias')
53-
}
54-
5546
if (compositionOnly) {
5647
partialConfig.define['__VUE_I18N_LEGACY_API__'] = false
5748
debug('set __VUE_I18N_LEGACY_API__ is `false`')

src/options.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export type VitePluginVueI18nOptions = {
22
forceStringify?: boolean
3-
runtimeOnly?: boolean
43
compositionOnly?: boolean
54
fullInstall?: boolean
65
include?: string | string[]

0 commit comments

Comments
 (0)