Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.

Rollup and Vite plugin for custom block support for fluent-vue

Notifications You must be signed in to change notification settings

fluent-vue/rollup-plugin-fluent-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 17, 2022
0c0d834 · Sep 17, 2022

History

70 Commits
Jul 14, 2022
Jul 16, 2022
Jul 5, 2022
Mar 28, 2022
Mar 29, 2022
Dec 26, 2021
Jul 14, 2022
Feb 3, 2022
Sep 17, 2022
Jul 16, 2022
Jul 16, 2022
Mar 28, 2022
Dec 26, 2021

Repository files navigation

⚠ DEPRECATED ⚠

Funtionatily was moved to unplugin-fluent-vue

rollup-plugin-fluent-vue

rollup-plugin-fluent-vue is a Rollup plugin that allows to use custom blocks with locale messages in fluent-vue. It can also be used as Vite plugin

Instalation

Add rollup-plugin-fluent-vue to your dev-dependencies:

For npm users:

npm install rollup-plugin-fluent-vue --save-dev

For yarn users:

yarn add rollup-plugin-fluent-vue --dev

Add plugin to your Rollup or Vite config

Rollup:

import fluentPlugin from 'rollup-plugin-fluent-vue'

module.exports = {
  plugins: [
    fluentPlugin(),
  ],
}

Vite:

import vue from '@vitejs/plugin-vue'
import fluentPlugin from 'rollup-plugin-fluent-vue'

export default {
  plugins: [vue(), fluentPlugin()],
}

Options

blockType

Type: string
Default: fluent

Custom block tag name.

Example

Example of App.vue with custom block:

<template>
  <p>{{ $t('hello') }}</p>
</template>

<script>
export default {
  name: 'App',
}
</script>

<fluent locale="en">
hello = hello world!
</fluent>