Git Product home page Git Product logo

Comments (3)

webdiscus avatar webdiscus commented on June 1, 2024

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.

ladown avatar ladown commented on June 1, 2024

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.

webdiscus avatar webdiscus commented on June 1, 2024

@ladown

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.