2

我想知道如何让两个包编译相同的文件扩展名。

我正在编写一个.jsx通过查找某些字符串并替换它们来编译的包。在这个插件中,我正在使用isobuild:compiler-plugin@1.0.0

Plugin.registerCompiler({
  extensions: ['jsx']
}, function () {
  ...
});

问题是我不能将它与 mdg 的jsx包一起使用,因为该包也在尝试编译.jsx.

流星给了我:

While determining active plugins:
error: conflict: two packages included in the app (jsx and my-plugin) are both trying to handle *.jsx

理想情况下,我希望jsx插件首先编译.jsx文件,然后我的插件再次编译它们。关于如何实现这一目标的任何建议?或者有人可以指出我的任何其他方向吗?

4

0 回答 0