Skip to content

Commit 9cdb5d2

Browse files
committed
docs: drop vite-plugin-vue-i18n and vue-i18n-loader
1 parent 5a9f233 commit 9cdb5d2

File tree

4 files changed

+1
-616
lines changed

4 files changed

+1
-616
lines changed

docs/guide/advanced/optimization.md

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -94,100 +94,6 @@ module.exports = {
9494
9595
About options and features, see the detail [page](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n#intlifyunplugin-vue-i18n)
9696
97-
### vite-plugin-vue-i18n
98-
99-
[`vite`](https://vitejs.dev/) is next generation frontend tooling.
100-
101-
Intlify project is providing [`vite-plugin-vue-i18n`](https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n)
102-
103-
If you do a production build, Vue I18n will automatically bundle the runtime only module
104-
105-
:::warning NOTICE
106-
This plugin support until `Vite 3`. If you would like to use on `Vite 4`, please use `@intlify/unplugin-vue-i18n`
107-
:::
108-
109-
#### Install plugin
110-
111-
```sh
112-
npm install --save-dev @intlify/vite-plugin-vue-i18n
113-
```
114-
115-
#### Configure
116-
117-
```js
118-
// vite.config.ts
119-
import { defineConfig } from 'vite'
120-
import { resolve, dirname } from 'node:path'
121-
import { fileURLToPath } from 'url'
122-
import vueI18n from '@intlify/vite-plugin-vue-i18n'
123-
124-
export default defineConfig({
125-
/* ... */
126-
plugins: [
127-
/* ... */
128-
vueI18n({
129-
/* options */
130-
// locale messages resource pre-compile option
131-
include: resolve(dirname(fileURLToPath(import.meta.url)), './path/to/src/locales/**'),
132-
}),
133-
]
134-
})
135-
```
136-
137-
#### More configuration
138-
139-
About options and features, see the detail [page](https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n)
140-
141-
### vue-i18n-loader
142-
143-
[webpack](https://webpack.js.org/) is a static module bundler for modern JavaScript applications.
144-
145-
Intlify project is providing [`vue-i18n-loader`](https://github.com/intlify/bundle-tools/tree/main/packages/vue-i18n-loader)
146-
147-
:::warning NOTICE
148-
This plugin will be deprecated in the near future, because we can replace `@intlify/unplugin-vue-i18n`.
149-
:::
150-
151-
#### Install loader
152-
153-
```sh
154-
npm install --save-dev @intlify/vue-i18n-loader
155-
```
156-
157-
#### Configure
158-
159-
```js
160-
// webpack.config.js
161-
const path = require('path')
162-
163-
module.exports = {
164-
/* ... */
165-
resolve: {
166-
alias: {
167-
'vue-i18n': 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
168-
}
169-
},
170-
/* ... */
171-
module: {
172-
rules: [
173-
// ...
174-
{
175-
test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files
176-
type: 'javascript/auto',
177-
loader: '@intlify/vue-i18n-loader',
178-
include: [ // Use `Rule.include` to specify the files of locale messages to be pre-compiled
179-
path.resolve(__dirname, 'src/locales')
180-
]
181-
},
182-
// ...
183-
]
184-
}
185-
}
186-
```
187-
188-
#### More configuration
189-
190-
About options and features, see the detail [page](https://github.com/intlify/bundle-tools/tree/main/packages/vue-i18n-loader)
19197
19298
### Quasar CLI
19399
@@ -243,12 +149,6 @@ About how to configure for bundler, see the [here](#configure-feature-flags-for-
243149
- Vite: configured by default, but can be overwritten using the [`define` option](https://github.com/vitejs/vite/blob/a4133c073e640b17276b2de6e91a6857bdf382e1/src/node/config.ts#L72-L76)
244150
- Quasar CLI: configured by default, but can be overwritten using quasar.conf.js > build > [env option](https://quasar.dev/quasar-cli/handling-process-env#adding-to-process-env)
245151
246-
:::tip NOTE
247-
If you are using Vite, you can do the same thing by specifying the option in the [plugin provided officially](https://github.com/intlify/vite-plugin-vue-i18n).
248-
249-
Also, if you are using the Vue CLI, you can use the [officially provided plugin](https://github.com/intlify/vue-cli-plugin-i18n) to optimize the settings in `vue.config.js`.
250-
:::
251-
252152
:::tip NOTE
253153
The replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions.
254154
:::

0 commit comments

Comments
 (0)