We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The package.json API allows specifying different sources per target: https://parceljs.org/features/targets/#package.json%23targets.*.source
package.json
{ "targets": { "frontend": { "source": "app/index.html" }, "backend": { "source": "api/index.js" } } }
At the moment this isn't available with the Parcel API.
With the Parcel API you're able to define the source per target in the same way that entries works.
entries
import {Parcel} from '@parcel/core'; let bundler = new Parcel({ defaultConfig: '@parcel/config-default', mode: 'production', targets: { modern: { source: "**/*.js" }, legacy: { source: "**/legacy/*.js" } } });
Not available.
Basically the codepath in
parcel/packages/core/core/src/requests/EntryRequest.js
Lines 201 to 237 in f8d3fc3
this.options.targets
resolveEntry
Open question about this: What should happen with the top-level entries? Currently it's required but how would that play into this?
The text was updated successfully, but these errors were encountered:
Updating the API to make it clear that this can't be done would save time!
Sorry, something went wrong.
source
No branches or pull requests
🙋 feature request
The
package.json
API allows specifying different sources per target: https://parceljs.org/features/targets/#package.json%23targets.*.sourceAt the moment this isn't available with the Parcel API.
🤔 Expected Behavior
With the Parcel API you're able to define the source per target in the same way that
entries
works.😯 Current Behavior
Not available.
💁 Possible Solution
Basically the codepath in
parcel/packages/core/core/src/requests/EntryRequest.js
Lines 201 to 237 in f8d3fc3
this.options.targets
insideresolveEntry
function.Open question about this: What should happen with the top-level
entries
? Currently it's required but how would that play into this?The text was updated successfully, but these errors were encountered: