Giter Site home page Giter Site logo

Comments (2)

bradhardinge avatar bradhardinge commented on August 23, 2024

Update: I managed to get this working almost exactly as I want...

I updated webpack.prod.js to:

// Configure Html webpack
const configureHtml = () => {
    return {
        template: './src/webapp.html',        
        filename: 'webapp.html',
        inject: false,
    };
};

And created the ./src/webapp.html template with:

<%= htmlWebpackPlugin.tags.headTags %>

As mentioned, this works almost perfectly except the CSS is being added to webapp.html and injected when I don't need it as it's added later with craft.twigpack.includeCssModule.

I think this might be a favicons-webpack-plugin issue though...

from craft-twigpack.

bradhardinge avatar bradhardinge commented on August 23, 2024

Update: I got it working!

It feels like a bit of a hack solution, but it's working now. As the CSS tag is the last in webapp.html I edited the template code to the following:

<%= htmlWebpackPlugin.tags.headTags.slice(0, -1).join('') %>

I'll close this now, but if I missed a much better solution, please give me a yell.

from craft-twigpack.

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.