Comments (3)
I would even think that appending at bottom of the <body>
should happen by default for rel: 'prefetch'
. But just having the option to control it would be fine as well.
Any update from maintainers of this package?
from preload-webpack-plugin.
After a bit of exploration, I found https://github.com/architgarg/html-webpack-injector:
Plugin that simplifies injection of chunks into head and body using HtmlWebpackPlugin
I forked it and added one commit to "Move <link rel="prefetch" ...>
from <head>
to <body>
" slaweet/html-webpack-injector@155b57d. So it is possible to control which links are in <head>
and which in <body>
without modifying this vuejs/preload-webpack-plugin project.
Unfortunately, even when all <link rel="prefetch" ...>
elements are at the bottom of the page, they are still blocking the DOMContentLoaded
event and a Vue SPA won't start until they are all loaded. so I didn't see any performance improvement from doing all of this (tested on build served with https://www.npmjs.com/package/serve in Google Chome 88).
from preload-webpack-plugin.
Is this feature request the same descibed here?
If so, it would be really interesting. Right now I'm in trouble because I need to build a template without a <head>
, but it keeps being created to inject the tags.
from preload-webpack-plugin.
Related Issues (20)
- Can it make assets such as image font style add prefetch HOT 1
- Support imagesrcset and imagesizes
- Cannot read property 'tap' of undefined HOT 4
- Preloads images as script and assets that are not in the config HOT 2
- TypeError: webpackPublicPath.trim is not a function when output.publicPath is a function
- Spurious </link> closing tags are being emitted
- Document 'allAssets'
- How to only preload only fonts? HOT 1
- Preload and Prefetch config options HOT 1
- Add a feature where if the HTML Webpack Plugin is not present, then export changes to a JSON file.
- Ability to disable setting crossorigin for fonts
- preload Not effective;webpack HOT 2
- Is there any way to prefetch resource after page loaded?
- I tried your config and it works, resulting html has prefetch and preload links. I myself have config which preloads fonts and prefetches js and css and it works. Perhaps something else doesn't work in yout case. Are you using version 2? HOT 1
- Rspack compatibility
- Is it possible to use glob patterns with chunk names? How to preload specific chunks? HOT 4
- Ignore chunk via webpack comment HOT 3
- [Vue warn]: Cannot find element: #app HOT 1
- Doesnt work with the latest version of HtmlWebpackPlugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preload-webpack-plugin.