Skip to content

Using Parcel 2 programatically #4804

Answered by mischnic
m-allanson asked this question in General
Discussion options

You must be logged in to vote

Can I tell Parcel to ignore the package.json file, and only use the options that are provided by bundle.js?

I've looked at the code and passing a targets property in the options should cause package.json to be ignored. Not sure why this happens

However, that value is not present on PackageTargetDescriptor,

https://v2.parceljs.org/plugin-system/api/#PackageTargetDescriptor is used in a package.json, where package.json#default would be used as the distEntry for package.json#targets.default

So I guess it should be an optional property here: https://v2.parceljs.org/plugin-system/api/#TargetDescriptor

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@m-allanson
Comment options

Answer selected by m-allanson
Comment options

You must be logged in to vote
1 reply
@m-allanson
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants