🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

babel-plugin-record-multilingual-entries

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-record-multilingual-entries

babel plugin vue2 multilingual entries

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
29
383.33%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-record-multilingual-entries

Installation

npm i babel-plugin-record-multilingual-entries

Usage

const babelPluginRecordMultilingualEntries = require('babel-plugin-record-multilingual-entries');

module.exports = {
    ...
    plugins: [
        ...
        [[
            babelPluginRecordMultilingualEntries, { 
                // 用户自定义的 多语言方法体, 传入该参数会覆盖插件 默认的方法体 (该插件 默认是 -> ['_vm.$t', 'this.$t', 'this.$i18n.t'])
                // cusCompiledMultilingualList: [],

                // 当有 多语言词条是 拼接的例如: $t('a' + item), 此时该文件路径就会被记录到 checkFileObj (需要手动确认词条)
                checkFileObj: {},

                // 结果集
                resultList: [],
                writerPath: '', // path 此配置可帮助用户在编译阶段 一边编译一边写多语言词条,通过流的方式
            }
        ]]
    ]
}

Example

  • 见文章 https://juejin.cn/post/7361805210639400972

Keywords

babel

FAQs

Package last updated on 19 Jun 2024

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