0.11.0 • Published 3 years ago

@traduki/vite-plugin-traduki v0.11.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

@traduki/vite-plugin-traduki

npm

See main github repository readme.md

Examples

Install

npm install --save-dev @traduki/vite-plugin-traduki
npm install @traduki/runtime # or @traduki/react if you're using React

Usage

Create a vite.config.ts configuration file and import the plugin:

// vite.config.ts
import type { UserConfig } from 'vite';
import tradukiPlugin from '@traduki/vite-plugin-traduki';

export default: UserConfig = {
    jsx: 'react', // In case you're using React
    plugins: [tradukiPlugin({
        /*
         * Description: Hashing function for the global message keys
         * Default: ({ key, texts[] }) => string
         * Optional
         */
        keyHashFn: myCustomHashFunction, // Probably won't need this, the default should be just fine
        /*
         * Description: Match files to be handled by Traduki
         * Default: /\.messages\.yaml$/
         * Optional
         */
        includes: /\.messages\.yaml$/,
    })],
};
0.11.0

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.1

3 years ago

0.8.0

3 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.4

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago