Jss: [jss-global] Don't publish `.babelrc` to npm

Created on 29 Jan 2018  路  7Comments  路  Source: cssinjs/jss

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.

bug low plugin

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.

All 7 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mg901 picture mg901  路  3Comments

Telokis picture Telokis  路  3Comments

glowkeeper picture glowkeeper  路  5Comments

oliviertassinari picture oliviertassinari  路  6Comments

brianmhunt picture brianmhunt  路  5Comments