There's this new bundler, called Parcel. Its behavior relies on .babelrc file published to npm package. If it finds one, it tries to run babel on entrypoint provided in main with the configuration provided in .babelrc. Babel plugins are included in devDependencies section of package.json which are not being installed, so it fails.
Please, publish only files that are necessary for inclusion.
Yep, I need to change that for all repos, using files field in package json instead of .npmignore
@Vanuan why does parcel behaves this way?
@iamstarkov You should ask its author :) There's an ongoing discussion here: https://github.com/parcel-bundler/parcel/issues/13
It looks like Parcel author tries to establish a practice of publishing source code to npm along with instructions to build it. .babelrc heuristics is just the simplest implementation.
This is ultimately wrong from parcel, it uses babelrc config from a project it doesn't own but doesn't install the required dependencies of that project. In any case I probably should not publish the babelrc, so I don't care why they do what they do.
in other words, what did parcel expect?
This is fixed via package.json files field
Most helpful comment
This is ultimately wrong from parcel, it uses babelrc config from a project it doesn't own but doesn't install the required dependencies of that project. In any case I probably should not publish the babelrc, so I don't care why they do what they do.