Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.4 KB

README.md

File metadata and controls

40 lines (32 loc) · 1.4 KB

i18n-check-keys-webpack-plugin

Webpack plugin for internationalization key checking

English | 简体中文

npm npm build status

Install

npm i i18n-check-keys-webpack-plugin -D
# or
yarn add i18n-check-keys-webpack-plugin -D
# or
pnpm add i18n-check-keys-webpack-plugin -D

Usage

const I18nCheckKeysWebpackPlugin = require('i18n-check-keys-webpack-plugin')

// webpack config
module.exports = {
  plugins: [
    new I18nCheckKeysWebpackPlugin({
      localePath: /locale/,
      benchmarkLang: 'zh_CN',
      needStopRun: process.env.NODE_ENV === 'production', // Stop the process if something is missing during packaging
    }),
  ],
}

Options

This plugin is a package of i18n-check-keys, please refer to the original document for specific configuration Document