mini-css-extract-plugin
mini-css-extract-plugin copied to clipboard
feat: add support for link preload/prefetch
This PR contains a:
- [ ] bugfix
- [x] new feature
- [ ] code refactor
- [ ] test update
- [ ] typo fix
- [ ] metadata update
Motivation / Use-Case
This pull request adds webpackPrefetch and webpackPreload magic comments support of webpack at import() for css files, per this issue: https://github.com/webpack-contrib/mini-css-extract-plugin/issues/142.
It is also an alternative realization of https://github.com/webpack-contrib/mini-css-extract-plugin/pull/344 and https://github.com/webpack-contrib/mini-css-extract-plugin/pull/488 pull requests, which are not merged and are not active.
See also https://github.com/webpack/webpack/pull/7056 pull request of webpack repository.
Breaking Changes
No breaking changes.
Additional Info
- :white_check_mark: login: alexander-akait / name: Alexander Akait (c47bd0f6080cccc1001b81b84fd89c885f3dfeb3)
- :x: - login: @FogelAI . The commit (b785fd8eff6e09073f5d79f7dae498a3a2f62c32, 64518339d71c70c03e52d1d8c8a8891268839aa2, d14f62c9d382b5cbaa7df12436bf236bfa42de82, c10b21b14aeeca0bbaa85a1df4f990b7fc1c6747, 978b5fa65939c78e31ab9cc47711be3f5f8025e8, c0ec939492b5e848ec328d07789b6d7f8f56bed4, 16a7d327c7d595e630f75b3648d86cccf0d8ac07, 4bc0aae40e82f8b73139a517029cd96ed0f1f621) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.
@alexander-akait is it ok to merge this one?
@grybykm @FogelAI Sorry for delay, yes, code is fine, but we need tests for it
Hi @alexander-akait I have added the tests. Please note that the commit https://github.com/webpack-contrib/mini-css-extract-plugin/pull/1043/commits/b785fd8eff6e09073f5d79f7dae498a3a2f62c32 is the CSS version of https://github.com/webpack/webpack/pull/17497/commits/f5dab1b6e65d6c590e61207395ab2dc6caadf86a.
@FogelAI Can you accept CLA?