dist folder not included in NPM package
META-DREAMER opened this issue · 7 comments
Hitting the same issue. Is there a workaround?
@HammadJ @antonycourtney Hmm. Currently we have no workaround about it. I'll investigate more in this weekend.
@Kiikurage Thanks for looking into it. For what it's worth I managed to work around by cloning the repository, building locally, and then copying the dist
dir from local build into the node_modules/babel-plugin-flow-to-typescript
directory in the project I wanted to convert. I imagine doing an npm install from my local build (instead of from npm) would also have worked.
Overall just looks like a bad publish on npm that inadvertently omitted the build dir.
@Kiikurage You’ve added dist
to your .gitignore
, which seems appropriate. But you have no .npmignore
…and with no .npmignore
, npm defaults to using .gitignore
.
Creating an appropriate .npmignore
should fix it.
Here's a patch for it if someone wants to do a PR https://github.com/steelbrain/babel-plugin-flow-to-typescript/commit/9ce943e71509da4d103b2416576e2c078019771f
Another solution is to put a files
whitelist in the package.json file. This is generally more maintainable than the .npmignore
blacklist. Let me get a PR ready. Edit: #27
plop any news on this ?