Giter Site home page Giter Site logo

Comments (3)

bryandugan avatar bryandugan commented on August 23, 2024

Did you clear the cache in the Craft CP at Utilities > Clear Caches > Twigpack Manifest Cache?

I was just having the same issue and that fixed it for me on my production site.

Andrew also has a script that he uses to clear the cache on every deploy if that's helpful. https://nystudio107.com/docs/twigpack/#caching

Here is the way I also include Twigpack in my layouts if that's helpful.

Header

    {{ craft.twigpack.includeCssModule("app.css", true) }}

    {% if getenv('ENVIRONMENT') != 'dev' and getenv('ENVIRONMENT') != 'local' %}
        {{ craft.twigpack.includeCssModule("app.css") }}
    {% endif %}

Footer

{{ craft.twigpack.includeSafariNomoduleFix() }}
{{ craft.twigpack.includeJsModule("chunk-vendors.js", true) }}
{{ craft.twigpack.includeJsModule("app.js", true) }}

If it's none of that, then it may quite possibly be an issue with the shared hosting setup.

from craft-twigpack.

janeschindler avatar janeschindler commented on August 23, 2024

Thanks for looking at this. Yes, I cleared all caches many times. It's a good idea to find out more about hosting. I don't know that much about server setups. What do you suspect could be a problem? It would be good to have more info before I call up the host.
-> Also, it would be good to know what kinds of disadvantages there might be to linking the CSS and JS without hashes, since that appears to be working right now. What is the reason for the hashes in the first place? Why does my app work fine without them?
Thanks.

from craft-twigpack.

khalwat avatar khalwat commented on August 23, 2024

Hashes are there to ensure that when files change, the clients won't be using an outdated version of the scripts/CSS.

See here for more: https://webpack.js.org/guides/caching/

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.