1.3.1 • Published 9 months ago

unplugin-fluent-vue v1.3.1

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

unplugin-fluent-vue

fluent-vue plugin for Vite, Webpack and Rollup (thanks to unplugin).

It adds support for defining Fluent messages in Vue SFCs and external ftl files.

Installation

npm install unplugin-fluent-vue --save-dev

Usage

Vite

// vite.config.js
import {
  ExternalFluentPlugin,
  SFCFluentPlugin,
} from 'unplugin-fluent-vue/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    vue(),
    // Choose one of the following:
    SFCFluentPlugin({ // define messages in SFCs
      blockType: 'fluent', // default 'fluent' - name of the block in SFCs
      checkSyntax: true, // default true - whether to check syntax of the messages
    }),
    ExternalFluentPlugin({ // define messages in external ftl files
      baseDir: path.resolve('src'), // required - base directory for Vue files
      ftlDir: path.resolve('src/locales'), // required - directory with ftl files
      locales: ['en', 'da'], // required - list of locales
      checkSyntax: true, // default true - whether to check syntax of the messages
    }),
  ],
})

Docs: https://fluent-vue.demivan.me/integrations/unplugin.html

1.3.1

9 months ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

3 years ago

1.1.1

3 years ago

0.1.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago