【文件属性】:
文件名称:babel-plugin-transform-define:类似于Webpack的DefinePlugin的babel编译时间代码替换
文件大小:71KB
文件格式:ZIP
更新时间:2021-05-02 13:18:49
JavaScript
babel-plugin-transform-define
类似于Webpack的babel编译时间代码替换
快速开始
$ npm install --save-dev babel-plugin-transform-define
.babelrc
{
" plugins " : [
[ " transform-define " , {
" process.env.NODE_ENV " : " production " ,
" typeof window " : " object "
}]
]
}
.babelrc.js
// E.g., any dynamic logic with JS, environment variables, etc.
const overrides = require ( "./another-path.j
【文件预览】:
babel-plugin-transform-define-master
----.travis.yml(282B)
----.eslintrc(93B)
----package.json(1KB)
----test()
--------.eslintrc(262B)
--------member-expression()
--------index.js(6KB)
--------load-dynamic-babelrc()
--------identifier()
--------0()
--------emptyString()
--------false()
--------null()
--------unary-expression()
--------undefined()
----LICENSE(1KB)
----CONTRIBUTING.md(573B)
----.npmignore(42B)
----.gitignore(95B)
----CHANGELOG.md(2KB)
----lib()
--------index.js(4KB)
----CODE_OF_CONDUCT.md(3KB)
----README.md(2KB)
----yarn.lock(140KB)
----.eslintignore(13B)