npm

Join us for the "JavaScript Supply Chain Security" tech talk, presented by VP of Security, Adam Baldwin. 6/20 at 10am PT.Sign up here »

sk-i18n-webpack-plugin

0.0.2 • Public • Published

sk-i18n-webpack-plugin

I18N Webpack Plugin for ShaneKing

npm

Install

# for webpack 4+ 
npm install --save-dev sk-i18n-webpack-plugin

Usage

⚠️ Since webpack v4

const SKI18NWebpackPlugin = require("sk-i18n-webpack-plugin");
 
module.exports = {
  plugins: [
    new SKI18NWebpackPlugin({
      folderMapping: {codesAddress: 'codes'},
      dist: 'json',
      srcs: ['public/json/codes_en_US.json', 'public/json/codesAddress_en_US.json', 'public/json/i18n_en_US.json', 'public/json/i18n_zh_CN.json']
    })
  ]
};

Options

new SKI18NWebpackPlugin(options: object)
Name Type Description
srcs {Array} the i18n json files
dist {String} output path (Relative to the outputPath)
folderMapping {Object} mapping for big code table
hashAlgorithm {String} hash algorithm
hashLength {Integer} length of hash use in file name
verbose {Boolean} log

install

npm i sk-i18n-webpack-plugin

Downloadsweekly downloads

2

version

0.0.2

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability