Skip to content
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

[WIP/RFC] .parcelignore #448

Closed
wants to merge 9 commits into from
Closed

[WIP/RFC] .parcelignore #448

wants to merge 9 commits into from

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented Dec 31, 2017

So i gave .parcelignore a shot because it's been requested in some issues.

Some questions

  • Should the ignore, ignore the files completely or include them as is without parsing?
  • Currently i'm having issues by not wanting to read the .parcelignore synchronous and seeing that all getDependencies/addDependency logic is synchronous, so if i would change it into an asynchronous function I would change a lot of core logic which is not really a good idea I think. Is there a better way to handle this or should i write .parcelignore logic to be synchronous?
  • Does this collide with the whole point of 0-config?

Progress:

  • Create ignoreChecker following gitignore logic
  • Find the best way to alter getDependencies Should end up in the resolver
  • Ignore files that are flagged by ignoreChecker

related #141 #357 #333

@devongovett
Copy link
Member

Good questions! Also related: #474. Not sure I have the answers yet. I think we need a bit more input from others on how this should work.

On your second point, I don't think I'd do this in addDependency. I think it's ok if the dependency is still parsed. Instead, you could check in the Resolver, and return null if the file is ignored. That will cause a few other changes to check for null in Bundler, but should be easier than trying to change the logic in every asset type.

@jamiebuilds
Copy link
Member

I would like to discuss this in the context of a more complete (.parcelrc) config format. I think it's possible that this would not be necessary.

@mikkiek
Copy link

mikkiek commented Jan 11, 2018

Hello,

Any ideas when can i expect parcelignore "miracle"?

@agauniyal
Copy link

In my case(#357) I wanted to ignore certain sections, not the whole file itself 😅, would that be possible with this PR?

@mathiasrw
Copy link

A central use case would be to link from your HTML to a legacy entry point.

Let's say you have a nice static website up and running with parceljs but you would like to link to your crazy old PHP3 system located at /login - at the current version <a href="/login">login</a> will result in an error because it cant find /../../../../../login (at the root of the drive)

I suggest adding /login to the .parcelignore would ignore it as a dependency and just move along without any output.

@jessehattabaugh
Copy link

jessehattabaugh commented Mar 6, 2018

In my case I'm using Firebase hosting, and want to use their special urls to load the firebase api. Would be nice to have a .parcelignore where I could ignore globs like /__/*.

@mathiasrw
Copy link

@DeMoorJasper any inputs to why this got rejected?

@DeMoorJasper
Copy link
Member Author

@mathiasrw I just closed it due to inactivity if parcelignore ever gets approved i’ll just make a new pr

Sent with GitHawk

@dinvlad
Copy link

dinvlad commented Apr 23, 2018

+1 on special URLs used by Firebase

@mririgoyen
Copy link

Would like to see this reopened. Here's a PERFECT use case for it: moment/moment#2517 (comment)

@DeMoorJasper
Copy link
Member Author

Please do not comment on an old closed PR, open up a new issue instead.

@parcel-bundler parcel-bundler locked as too heated and limited conversation to collaborators Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants