rollup plugin module replacement:用于替换Rollup中的模块的插件 源码

上传:corporate68819 浏览: 11 推荐: 0 文件:ZIP 大小:63.28KB 上传时间:2021-04-21 22:08:48 版权申诉
汇总插件模块更换 将软件包与汇总捆绑在一起时,请更换模块。 这对于允许生成之间的不同行为很有用。 插件也可以用于简单的别名。 此外,它提供了一种使用任何解析插件(例如 )链接别名的方法,请参见下面的示例。 让我们看一个例子: // rollup.config.js import replacement from "rollup-plugin-module-replacement" ; const appTarget = process . env . APP_TARGET || "VERSION_A" ; export default { // ... plugins : [ replacement ( { entries : [ { find : / ( . * ) -APP_TARGET ( \. * ) /
上传资源
用户评论