New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

localization-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localization-webpack-plugin

Localization webpack plugin. Create separate JSON files for every chunk.

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

LocalizationWebpackPlugin

Make separate JSON localization files for every chunk

  • See demo
  • See source of demo

Usage

This plugin creates merged JSON files with translations for cunks. One JSON file by one chunk. To get link to JSON file with translations you need to write in code

// 'chunkLocalizationURL: {"chunkName": "warAndPeace", "lang": "en"}' will be replaced by 'warAndPeace.en.json'
const linksToTranslationFiles = {
  warAndPeaceEN: 'chunkLocalizationURL: {"chunkName": "warAndPeace", "lang": "en"}',
  warAndPeaceRU: 'chunkLocalizationURL: {"chunkName": "warAndPeace", "lang": "ru"}'
};

Options

plugins: [
  ...
  new LocalizationWebpackPlugin({
    filename: '[chunkname].[lang].json', // Avaible: [chunkname], [hash], [lang]
    locales: ['en', 'ru'],
  }),
],
  • filename: the default value is [chunkname].[lang].json Avaible tags is [chunkname], [hash], [lang]
  • locales: the default value is ['en']

Keywords

webpack

FAQs

Package last updated on 22 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts