Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.22 KB

README.zh_CN.md

File metadata and controls

38 lines (30 loc) · 1.22 KB

i18n-check-keys-webpack-plugin

用于国际化键检查的 Webpack 插件

English | 简体中文

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', // 在打包时检查到有缺失就停止进程
    }),
  ],
}

Options

该插件为 i18n-check-keys 的封装,具体配置请查看原文档 Document