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

fluent-vue Webpack loader that adds support for custom blocks in Vue SFC

License

Notifications You must be signed in to change notification settings

fluent-vue/fluent-vue-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

73962a4 · Sep 17, 2022
Oct 30, 2021
Sep 19, 2021
Oct 31, 2021
Oct 30, 2021
Oct 30, 2021
Oct 31, 2021
Oct 31, 2021
Oct 30, 2021
Sep 17, 2022
Oct 30, 2021
Oct 31, 2021
Oct 31, 2021
Oct 30, 2021
Oct 31, 2021
Oct 30, 2021

Repository files navigation

⚠ DEPRECATED ⚠

Funtionatily was moved to unplugin-fluent-vue

fluent-vue-loader

GitHub Workflow Status codecov Standard - JavaScript Style Guide GitHub license

Webpack loader that allows to use Vue custom blocks for locale messages in fluent-vue

Installation

Add fluent-vue-loader to your dev-dependencies:

For npm users:

npm install fluent-vue-loader --save-dev

For yarn users:

yarn add fluent-vue-loader --dev

Add loader to your Webpack config

module.exports = {
  module: {
    rules: [
      // ...
      {
        resourceQuery: /blockType=fluent/,
        loader: 'fluent-vue-loader',
      },
      // ...
    ]
  }
}

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>