eslint-import-resolver-babel-module icon indicating copy to clipboard operation
eslint-import-resolver-babel-module copied to clipboard

Run compile when installing from github

Open mgtitimoli opened this issue 6 years ago • 0 comments

Hi there,

Before moving forward I want to thank you for all your work, I have been using the package for a long time and it's amazing, thanks!

I opened the issue since I've installed latest babel, and I noticed that the version that started using babel had not yet been published (is there a chance you can publish it?), so I pointed the package to be obtained from github/master, and I got an error that it can't load the module.

After digging a bit, I found that the problem was that package.main points to a file that's created on npm.prepare (npm run compile), and since I was getting it from the repo and not from npm, that script didn't run and therefore the main file was missing.

In order to solve the issue and be able to use the package also directly from github, instead of using npm.prepare hook, npm.prepack should be used.

I believe doing this change will do no harm and allow testing the package before it gets published.

What do you think?

mgtitimoli avatar Apr 21 '18 02:04 mgtitimoli