-
-
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
Is there a Parcel equivalent to Webpack's resourceQuery? #2186
Labels
Comments
Currently not (and there are other usecases where this is really needed), merging with #1084 Parcel 2 might process |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
❔ Question
Is there a Parcel equivalent to Webpack's
resourceQuery
that allows you to use different loaders for assets with the same file extension with the help of a query parameter, or something similar?🔦 Context
Parcel is a phenomenal tool, and the only thing that is holding me back from migrating to it in various projects is that there seems to be no way to treat assets with the same extension in different ways. This applies to e.g. loading some CSS as global and some as CSS modules, some images as regular images and some as lqip previews, etc.
💻 Code Sample
In Webpack you can use a
resourceQuery
to e.g. treat imported CSS with an added?global
query parameter as regular global CSS, and every other CSS file as CSS modules.The text was updated successfully, but these errors were encountered: