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

Allow to programmatically define parcel config for the API #9990

Open
CyriacBr opened this issue Oct 24, 2024 · 0 comments
Open

Allow to programmatically define parcel config for the API #9990

CyriacBr opened this issue Oct 24, 2024 · 0 comments

Comments

@CyriacBr
Copy link

CyriacBr commented Oct 24, 2024

🙋 feature request

I've been testing and benchmarking some new bundlers to replace a very old frontend project and Parcel is the only one that doesn't let you define all configurations programmatically. For example, no way to pass transformers to Parcel constructor...
That feature seems to have been removed because of #4927.

🤔 Expected Behavior

Parcel should let you pass all configs as an object like all other bundlers do.

😯 Current Behavior

config expects a path to read a static file.

💁 Possible Solution

One very ugly solution is to create a temp file with the config you want before calling Parcel.

🔦 Context

Building code programmaticaly.

💻 Examples

new Parcel({
  config: {
    // whatever config you want
  },
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant