4.13.0 • Published 4 months ago

@lingui/vite-plugin v4.13.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

License Version Downloads

@lingui/vite-plugin

Vite plugin that compiles Lingui catalogs on the fly. In summary, the lingui compile command isn't needed when using this plugin.

@lingui/vite-plugin is part of LinguiJS. See the documentation for all information, tutorials and examples.

Installation

npm install --save-dev @lingui/vite-plugin
# yarn add --dev @lingui/vite-plugin

Usage

Via vite.config.ts

import { UserConfig } from 'vite';
import { lingui } from '@lingui/vite-plugin'

const config: UserConfig = {
  plugins: [lingui()]
}

Then in Vite-processed code:

// *.po files assigned to this loader by default
const { messages } = await import(`./locales/${language}.po`);

// for other extension you have to use `?lingui` suffix
const { messages } = await import(`./locales/${language}.json?lingui`);

See Vite's official documentation for more info about Vite dynamic imports https://vitejs.dev/guide/features.html#dynamic-import

License

MIT

5.0.0-next.3

4 months ago

5.0.0-next.2

4 months ago

4.13.0

4 months ago

4.12.0

4 months ago

5.0.0-next.1

5 months ago

4.11.4

5 months ago

5.0.0-next.0

7 months ago

4.11.1

8 months ago

4.11.2

7 months ago

4.11.3

6 months ago

4.11.0

9 months ago

4.10.1

9 months ago

4.10.0

10 months ago

4.8.0

10 months ago

4.7.2

11 months ago

4.8.0-next.1

11 months ago

4.8.0-next.0

11 months ago

4.7.1

12 months ago

4.7.0

1 year ago

4.5.0

1 year ago

4.4.1

1 year ago

4.4.0

2 years ago

4.6.0

1 year ago

4.4.2

1 year ago

4.3.0

2 years ago

4.1.0

2 years ago

4.2.1

2 years ago

4.1.2

2 years ago

4.2.0

2 years ago

4.1.1

2 years ago

4.0.0-next.8

2 years ago

4.0.0-next.7

2 years ago

4.0.0-next.6

2 years ago

4.0.0

2 years ago

4.0.0-next.1

2 years ago

4.0.0-next.0

2 years ago

4.0.0-next.5

2 years ago

3.17.2

2 years ago

4.0.0-next.4

2 years ago

4.0.0-next.3

2 years ago

4.0.0-next.2

2 years ago

3.17.1

2 years ago

3.17.0

2 years ago

3.16.1

2 years ago