Webpack plugin for internationalization key checking
English | 简体中文
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
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
}),
],
}
This plugin is a package of i18n-check-keys
, please refer to the original document for specific configuration
Document