2

I would like to know how to get two packages to compile the same file extension.

I am writing a package that compiles .jsx by looking for certain strings and replacing them. Inside this plugin, I am using isobuild:compiler-plugin@1.0.0:

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

The problem is that I cannot use this with mdg's jsx package because that package is also trying to compile .jsx.

Meteor gives me:

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

Ideally, I would like jsx plugin to compile the .jsx files first, and then my plugin to compile them again. Any suggestions on how to achieve this? Or can someone point me to any other directions?

mc9
  • 6,121
  • 13
  • 49
  • 87
  • have you tried something like `.my.jsx` as an extension? I *think* that works. I'm not sure how you would get the jsx plugin to compile the result of your compilation (unless you can somehow rename the files), but at least you might be able to have two separate plugins compile those files. – Christian Fritz Dec 21 '15 at 04:10

0 Answers0