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

Bili as bundler for UI component libraries #353

Closed
StarpTech opened this issue May 22, 2020 · 2 comments
Closed

Bili as bundler for UI component libraries #353

StarpTech opened this issue May 22, 2020 · 2 comments

Comments

@StarpTech
Copy link

StarpTech commented May 22, 2020

Hi,
first of all thanks for this library. It solved my problem to bundle a complex react component with minimal efforts and great defaults like css-modules, latest babel features.

My next requirement is to bundle all components as separate bundles but with shared chunks. The file directory should be preserved. This would allow us to import the component with ESM as follow:

import { Button } from 'my-package'

Input: bili index.js

components
	Button
	 -> index.js
	 -> index.module.css
index.js

Output:

dist
	Button.js
index.js
index.css

There are plenty of solutions for that. I could use just babel or setup rollup manually but then I would lose the ease of use of Bili. What do you think? Rollup should be able to handle this via https://rollupjs.org/guide/en/#preservemodules

Related #268

@StarpTech
Copy link
Author

I think this issue describe a similiar requirement in microbundle developit/microbundle#457

@StarpTech
Copy link
Author

I archived my goal with just rollup. Wonderful article https://levelup.gitconnected.com/code-splitting-for-libraries-bundling-for-npm-with-rollup-1-0-2522c7437697

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