-
-
Notifications
You must be signed in to change notification settings - Fork 384
feat: link preload support (#142) #488
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
Conversation
Andrii.Sas seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
Codecov Report
@@ Coverage Diff @@
## master #488 +/- ##
==========================================
- Coverage 88.49% 88.31% -0.18%
==========================================
Files 5 5
Lines 426 428 +2
Branches 94 96 +2
==========================================
+ Hits 377 378 +1
- Misses 47 48 +1
Partials 2 2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need support this using webpack magic comments
@evilebottnawi thanks for quick reply. //entry.js
import("./a.js");
//a.js
//a source...
import "styles.css"; |
Any updates on this PR? |
What else needs to be done? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works very well for me
why this can't be merged?
Any ETA when this will be merged? |
This would be helpful for us too - any updates? |
Because it is invalid solution and should be solved using |
@evilebottnawi I think that the Webpack comments for preload/prefetch are only available on JS modules, and don't apply to CSS chunks. https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules Is there another path we can take to adding preload/prefetch to the tags generated by this plugin? |
This would be really useful for our project, is there anything I can help with to move this along ? Or can someone please advise what is needed to merge this |
@alexander-akait hello. |
We need rebase this PR and do some improvement, if somebody want to take it feel free and resend a PR |
Fixed in master, release soon |
This PR contains a:
Motivation / Use-Case
This pull request adds <link rel="preload"> support, per this issue: #142.
It is also an alternative realization of #344 pull request, which is not merged and is not active last 4 months.
It was inspired by article about async css load - https://www.filamentgroup.com/lab/load-css-simpler/
Main features:
New feature could be disabled by providing
cssPreload: false
intomini-css-extract-plugin
configBreaking Changes
No breaking changes.
Additional Info