Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cnhis-frontend/unplugin-i18n-helper

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cnhis-frontend/unplugin-i18n-helper - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

1

dist/types.d.ts

@@ -16,2 +16,3 @@ import { walk } from "estree-walker";

transforms?: (Transfrom | string)[];
jsx?: boolean;
}

@@ -18,0 +19,0 @@ export declare type Visitor = Parameters<typeof walk>[1];

8

package.json
{
"name": "@cnhis-frontend/unplugin-i18n-helper",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",

@@ -46,7 +46,9 @@ "scripts": {

"dependencies": {
"@rollup/pluginutils": "^5.0.0",
"acorn": "^8.10.0",
"acorn-jsx": "^5.3.2",
"estree-walker": "^2.0.1",
"htmlparser2": "^8.0.1",
"magic-string": "^0.25.7",
"unplugin": "^1.5.0",
"@rollup/pluginutils": "^5.0.0"
"unplugin": "^1.5.0"
},

@@ -53,0 +55,0 @@ "description": "自动查找 包含中文 的字符串和模板字符串,并替换为自定义的国际化方法",

@@ -109,2 +109,3 @@ # unplugin-i18n-helper

| output | `boolean` | - | 否 | 是否输出字符串处理的结果 |
| jsx | `boolean` | - | 否 | 针对jsx的处理 |

@@ -157,5 +158,8 @@

// 因为 babel-loader 对ES6语法做了转义, 而插件执行顺序是在 babel后
// 所有需要将 babel 处理时机置后 改为enforce="post"
/**
* 方案一
* 因为 babel-loader 对ES6语法做了转义, 而插件执行顺序是在 babel后
* 所以需要将 babel 处理时机置后 改为enforce="post"
* 注意js 文件中有 jsx 的代码则要启用配置选项jsx避免报错
*/
// vue.config.js

@@ -168,2 +172,18 @@ chainWebpack: config => {

}
/**
* 方案二
* 若不考虑兼容性问题,可以 exclude 选项 关掉 babel 的 模板字符串 处理插件
*/
// babel.config.js
module.exports = {
presets: [
[
"@vue/cli-plugin-babel/preset",
{
exclude: ["transform-template-literals"],
},
],
],
};
```

@@ -170,0 +190,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc