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

expose a defineConfig API to use a pkgroll.config.js configuration file #98

Open
error-four-o-four opened this issue Oct 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@error-four-o-four
Copy link
Contributor

error-four-o-four commented Oct 19, 2024

Hey there,

I was wondering if you'd be interested in the following feature

Feature request

as the title suggests the user could create a pkgroll.config.js configuration file in the root of the repository, which is loaded and parsed by the cli. Similar to other bundlers one could expose a defineConfig function to ensure type safety

Motivations

This feature could improve DX in the (rare) case the user passes multiple flags to the cli

I'd be willing to work on this feature but I don't know if I'll be able to so in the near future

@error-four-o-four error-four-o-four added the enhancement New feature or request label Oct 19, 2024
@privatenumber
Copy link
Owner

The convenience of pkgroll is that it doesn't have a config file. Behind the scenes, it parses the package.json so inputs aren't re-declared, and uses that to configure Rollup.

I do see merit in making the build more customizable though. I have plans to expose utils so people can use their own Rollup config that's pre-configured by pkgroll.

@Vija02
Copy link

Vija02 commented Feb 8, 2025

Would really love for this to happen. I've hit this wall a few times now where there are specific plugins that I needed which aren't included in pkgroll. Eg: #68 and rollup-plugin-node-polyfills.

Everything else is great except for this. The problem is that there's no way to go around it, so I'm forced to use a different bundler just because of what could've been a few lines of changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants