babel-plugin-eliminator:Babel插件可删除特定的命名出口等

时间:2021-03-25 17:19:42
【文件属性】:
文件名称:babel-plugin-eliminator:Babel插件可删除特定的命名出口等
文件大小:55KB
文件格式:ZIP
更新时间:2021-03-25 17:19:42
TypeScript 巴别塔插件消除器 这是什么? 这是一个babel插件,用于在JavaScript代码中删除特定的命名导出,这是Next.js实现getServerSideProps和getStaticProps ,它实际上删除了这些导出和引用的变量。 安装 npm i babel-plugin-eliminator 用法 删除特定的命名出口 选项: { " plugins " : [ [ " eliminator " , { " namedExports " : [ " foo " ]}] ] } 输入: import pkg from 'some-pkg' const someVariable = 'some-string' export const foo = ( ) => { return pkg ( someVariable ) } 输出: export var
【文件预览】:
babel-plugin-eliminator-main
----.gitignore(33B)
----package.json(774B)
----src()
--------named-exports.spec.ts(2KB)
--------index.ts(14KB)
----jest.config.js(246B)
----LICENSE(1KB)
----tsconfig.json(6KB)
----.github()
--------workflows()
----README.md(1KB)
----pnpm-lock.yaml(129KB)
----.prettierrc(26B)

网友评论