1.0.2 • Published 2 years ago

inline-translations-webpack-plugin v1.0.2

Weekly downloads
32
License
MIT
Repository
github
Last release
2 years ago

inline-translations-webpack-plugin

A fork of the deprecated i18n-webpack-plugin

Installation

$ yarn add inline-translations-webpack-plugin

Usage

let InlineTranslationPlugin = require("inline-translations-webpack-plugin");

new InlineTranslationPlugin(translations);

Every occurence of __("Translation") in your sources will be replaced with the inline string of the translation.

If you don't provide a translations dictionnary, the first argument is inlined. A common recipe is to use the default language translation as a key.