You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 25, 2018. It is now read-only.
Currently when using purifycss-webpack with multi-entry (aka multi-page app) builds, the paths option is applied against every Entrypoint.
In multi-page app builds this can lead to unnecessary overhead as there may be a distinct set of paths on a per entry basis.
Desired Behavior
Paths can be configured on a per Entrypoint basis. Therefore if entryA only uses paths [x,y,z] and entryB uses [q,r,s], then only those paths will be applied and purify separate CSS entry points as needed.
Suggested Proposal
I have forked this repo at work and have devised a scenario that could be used as an option.
paths property can be a function which is passed a entryName argument. The API may look something like this:
Optionally if we wanted to pass the whitelist and other options as well we could, but does increase complexity. Regardless this will allow css to be purified much more effectively on a per-entry bases and can allow for stripping some overhead.
The text was updated successfully, but these errors were encountered:
Current Behavior
Currently when using
purifycss-webpack
with multi-entry (aka multi-page app) builds, thepaths
option is applied against everyEntrypoint
.In multi-page app builds this can lead to unnecessary overhead as there may be a distinct set of
paths
on a per entry basis.Desired Behavior
Paths can be configured on a per
Entrypoint
basis. Therefore if entryA only uses paths[x,y,z]
and entryB uses[q,r,s]
, then only those paths will be applied and purify separate CSS entry points as needed.Suggested Proposal
I have forked this repo at work and have devised a scenario that could be used as an option.
paths
property can be a function which is passed aentryName
argument. The API may look something like this:Optionally if we wanted to pass the whitelist and other options as well we could, but does increase complexity. Regardless this will allow css to be purified much more effectively on a per-entry bases and can allow for stripping some overhead.
The text was updated successfully, but these errors were encountered: