egoist / egoist/rollup-plugin-postcss

Allow Style-Inject to not be bundled

Open
#165 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

It would be nice if style-inject could optionally not be bundled. This would allow libraries to include CSS and mark style-inject as a peer dependency such that it would not be duplicated for every library that might include it.

A way to do this might be to allow the import path to be specified by the config. The dev could then set it to "style-inject" instead of the relative path to the package. This would then allow rollup to treat the import normally as an external.

As a side-benefit, this would allows for different implementations of "style-inject" if users want to have custom behavior. This could alleviate a fair bit of issues where people want different behavior for injection.

I would be happy to submit a PR where a new option is added to the `postcss()` plugin and used as the path for style-inject.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.