-
Notifications
You must be signed in to change notification settings - Fork 29
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
Parcel v2 Optimizer Plugin #78
Comments
Instead of having to run a Parcel build step, and then subfont, it will be done in one go. |
I'm not super familiar with the api that Parcel exposes to plugins, but it's probably possible. Might require a heavy restructuring of subfont itself to make it less dependent on assetgraph, which I'm not sure that we want. |
A bundler for parcel would be more correct in terms of its lifecycle. It would be completely possible to build this, but it would probably not be a whole lot faster unless we accidentally have the same AST abstraction in Parcel and Assetgraph so we could skip the heavy parsing work. I can see they use postcss as well, but the dom representation differs. I imagine you could build such a plugin, iterate through all the html, css and font assets on the parcel graph and manually feed them into assetgraph to get our representation, then run something like https://github.com/parcel-bundler/parcel#bundler on it and load all the updated and added assets back into the parcel graph I also see this as seperate project, that just happens to use subfont. Like https://github.com/Munter/netlify-plugin-subfont |
I was wondering if subfont could have an optimer plugin for Parcel v2?
The text was updated successfully, but these errors were encountered: