-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's time to talk about 'parcel.config.js' #365
Comments
It would be helpful to list a few scenarios that this config file should support. Maybe we can either make it unnecessary or at least do the absolute minimum configuration. Note that we need to put a lot of thought into this. It's important not to just ship a half-baked solution for one or two cases. Whatever we do here will affect all parcel users, and a lot of people are starting to use parcel now. |
I thought that kind of goes against the value proposition. Or is this more to approach this in a really sensible way. (BTW we are challenged in the same way with this at webpack). It all boils down to the maintainibility and "surprise" level of the API. |
From the tagline:
... and I quite like that it's zero configuration. That's what caught my eye in the first place. But like @shawwn said, this needs to be discussed in great lengths before we make a decision. |
Stay strong, resist the temptation. As I understand it, parcel was meant to be different. If that works out, it is a true benefit. There are plenty of alternativew available for edge cases. |
In think the only config we would need is a .parcelignore, this way we could specify packages to ignore completely or not parse. Everything else can already be configured in their own config file. Which could contain the following:
|
I would like to avoid adding a parcel specific config. Once we add it, it's a slippery slope to end up like webpack. If there are specific configurations you need, please open issues for those and we will discuss them case by case, but usually configurations can be limited to ones that are specific to related tools like |
in the context of custom elements, babel requires a custom plugin |
@eavichay No, there's no way to configure source maps currently. Please open a new issue if the way source-maps work is causing any problems. |
I really tried to use Parcel, but that no configuration philosophy doesn't quite match reality. Documentation is also pretty poor... I got several cases where I coudn't make a simple application to work due to its inflexible nature. I'm really impressed to see that it has more than 22,000 likes.. It's not mature, the most available plugins are quite amateur ... It might be useful for some presentations or simple apps, but it's seems not meant to be used in most production apps... To have a bundler with no configuration is the same as create an application using only functions with no arguments. It's a really strange way of thinking for me... Gulp still has the most smart way of doing things...even though it's not a bundler... |
@Javiani I Agree partially. Zero configuration is just like using webpack with all the defaults. I think that configuration simplicity is (i.e. optional tweaks) is mandatory in a bundling tool. If at least it would load .babelrc, .babelconfig, .loaders ... as optionals I would say it could help but in real life you need tweaks to meet developer requirements. |
Parcel is not zero config, really, if you consider the CLI options as configuration. I currently have these scripts in my package.json to make parcel work with an electron app.
It sure would be nice if at least the CLI options could be abstracted to a |
@Squeegy Exactly, i'm for that too. |
👍 for |
I want Parcel to not do any transpilation, because I'm only targeting Chrome. If I do that via
Well, that's the point, I don't want babel-core. |
@dandv you can use browserslist to disable transpilation. Just add |
Thanks @devongovett, that worked. I'd like to extract that definition into |
@dandv the config file should be named either |
All it takes is one cigarette.. Next thing you know, you're smoking 2 boxes per day |
Lest we forget shoving our config in package.json! |
Would be nice to get parcel to work in monorepo environments. I like to use the |
+1 for CLI options as .parcelrc 👍 |
In my case, I need to use a script to figure out the publicPath from Without config file, I have to use the nodejs api of parcel-bundler const Bundler = require('parcel-bundler')
const options = {
publicUrl: 'path_calculate_from_env_variable_and_branch_name',
}
new Bundler(entryFiles, options).bundle() cli options is good, but any chance to leave user more choices? honestly I wouldn't like to maintain a too long script in npm scripts I think bundling app out-of-box with parcel-bundler is the advantage of it, but not We don't need the flexibility like webpack, but need a js file to save cli options, it doesn't violate parcel's design principle Edit: I see a .parcelrc in parcel-bundler v2, but didn't find the cli options configuration |
fyi, i have since started to pretty much solely use the |
webpack 100 lines
parcel 0 lines
I need 10 lines
Zero configuration is an impossible desire,people like simple ,but project need configurability
The text was updated successfully, but these errors were encountered: