Giter Club home page Giter Club logo

Comments (5)

charlier avatar charlier commented on June 14, 2024 1

Yup! that certainly seems to fix it! πŸ‘

from preact-cli.

rschristian avatar rschristian commented on June 14, 2024

This is a perfect place for v4 issues, thanks!

Are you seeing this when running the dev server or production builds?

from preact-cli.

charlier avatar charlier commented on June 14, 2024

This was with both production builds, and when running preact watch.
Having more of a poke around - I think the /routes directory might just be a symptom of the issue - and I'm in fact spinning up two instances of the app.

Looking at the source of the page (or opening up the generated index.html) I can see the bundle is included within the <head> element with a defer attribute, & again at the bottom of the page body with a type="module" attribute, so if I go ahead and remove the latter from my template.ejs everything just works.

I'm guessing webpack thinks it's being helpful and adding one itself?

from preact-cli.

rschristian avatar rschristian commented on June 14, 2024

Finally tracked it down (sorry if you were getting updates, I ran into a few red herrings and was posting here in case I got called away) and it's a really weird issue.

Indeed, it's html-webpack-plugin trying to be helpful and injecting tags (scripts as you noticed, but also styles, meta, etc), but Critters has a conflicting dependency and Webpack is resolving the plugins rather oddly. Will play around with module resolution, but Yarn for sure works, if that can be helpful.

from preact-cli.

rschristian avatar rschristian commented on June 14, 2024

I just published 4.0.0-next.2, which should correct this. Had to remove Critters though.

If you get a chance, try upgrading and let me know how you get on.

Thanks!

from preact-cli.

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.