-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated content when using /routes when using CLI v4 #1777
Comments
This is a perfect place for v4 issues, thanks! Are you seeing this when running the dev server or production builds? |
This was with both production builds, and when running Looking at the source of the page (or opening up the generated index.html) I can see the bundle is included within the I'm guessing webpack thinks it's being helpful and adding one itself? |
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 |
I just published If you get a chance, try upgrading and let me know how you get on. Thanks! |
Yup! that certainly seems to fix it! 👍 |
This is referencing the 4.0.0-next.1 pre-release, so apologies if this is the wrong place to capture unexpected new features. Please shout if it would be happier on the request ticket!
What is the current behaviour?
If you have a component in /routes directory it seems to get weirdly duplicated, so you end up with 2 instances (notice two Get Started... sections in the screenshot below).
Steps to Reproduce
A very quick repo step is to just a do an
npm init preact-cli default defaultproj
& notice everything in the<main>
section is there twice.Or as a minimal code example,
What is the expected behaviour?
Content not to be duplicated.
Please mention any other relevant information
Renaming the /routes directory (or moving the file), or downgrading to 3.4.5 as a workaround.
Tested on macOS 11.7.3, using NodeJS 16.17.1 (npm 8.15.0) & 18.13.0 (npm 8.19.3)
The text was updated successfully, but these errors were encountered: