Comments (3)
The pug-plugin is designed to replace the html-webpack-plugin, pug-loader and mini-css-extract-plugin completely.
The pug-plugin will never works together with HtmlWebpackPlugin. But very useful features of HtmlWebpackPlugin can be implemented in pug-plugin.
What do the preload-webpack-plugin?
Your imported JS file will be injected into HTML as the link
tag like:
<link rel="preload" as="script" href="chunk.31132ae6680e598f8879.js">
You can self this write in Pug:
link(rel="preload" as="script" href=require('./path/to/source/script.js') )
The generated HTML:
<link rel="preload" as="script" href="script.31132ae6680e598f8879.js">
P.S.: Can you please describe your feature request in details what do you concretely want.
from pug-plugin.
No doubt, that i can set preloaded resources by myself, but i want them to be set automatically, as mentioned plugin do.
from pug-plugin.
If there are any possibilities how to configure preload for styles or scripts
This doesn't make sense because all scripts and styles must be manually specified in the Pug template anyway. Therefore, the additional preload attribute can be added directly by yourself.
Π’he only thing that makes sense is the automatic addition of preloads for images, videos, fonts, etc, which was found in the template or in CSS (fonts, images). I put this idea on the stack.
from pug-plugin.
Related Issues (20)
- Very long project rebuild HOT 1
- Error RSPack with pug-plugin HOT 1
- i18next doesn't work after pug-plugin update to 5.0.0 (windows only) HOT 4
- How to complie the pug file to template function on pug-plugin v5 like pug-plugin v4? HOT 9
- How do I connect modules so that I can use them, instead of getting the resolved path to this module? HOT 2
- Some difficult questions (SCSS import as string)... HOT 7
- [FEATURE REQUEST] Preload support for font image audio video HOT 4
- Require manifest.json file HOT 3
- How to use Tailwind CSS with pug-plugin HOT 5
- Unexpected token '.' in Plugin.js issue. Can't compile my files HOT 1
- When connecting one page to js, ββa number is substituted HOT 4
- How to set the correct path to files connected via url in scss with Output Path option HOT 3
- Compilation fail on module contents change HOT 5
- The handling of @import at-rules in CSS is not supported. HOT 4
- [FEATURE REQUEST] Add ability to disable scripts compiling. HOT 2
- Failed to generate common named chunk with enabled pug plugin HOT 4
- Invalid url when using full path "publicPath" option HOT 5
- How to dynamically substitute a path in pug include HOT 1
- Issue with imports in required scripts HOT 7
- handling pug in webpack setupMiddlewares
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 pug-plugin.