Skip to content
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

static router outputting a <script> tag with a path of /undefined (when an SSR route is present?) #1051

Open
thescientist13 opened this issue Feb 5, 2023 · 0 comments
Labels
bug Something isn't working CLI good first issue Good for newcomers Router
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Feb 5, 2023

Type of Change

Bug

Summary

Noticed that although the specs are passing, the generated output from the test produces a <script> and <link> preload tag with src and href respectively with a value of /undefined.

<!DOCTYPE html>
  <html lang="en" prefix="og:http://ogp.me/ns#">


  <head>
    <link rel="modulepreload" href="/undefined" as="script">
    ...
    
    <script type="module" src="/undefined"></script>

    <script>window.__greenwood = window.__greenwood || {}; window.__greenwood.currentTemplate = "page";</script>
  </head>

  <body>
    ...
  </body>

</html>

Details

I notice in the test case build.config.static-router.spec.js that it also contains an SSR route, so that is what could be accounting for this errant <script> tag?

Would be good to make sure fix this and adjust the specs accordingly. My guess is to start in the bundle lifecycle and see what resource are being tracked.

@thescientist13 thescientist13 added bug Something isn't working CLI Router labels Feb 5, 2023
@thescientist13 thescientist13 added this to the 1.0 milestone Feb 5, 2023
@thescientist13 thescientist13 added the good first issue Good for newcomers label Feb 5, 2023
@thescientist13 thescientist13 changed the title static router outputting a <script> tag with a path of undefined when an SSR route is present static router outputting a <script> tag with a path of /undefined (when an SSR route is present?) Feb 5, 2023
@thescientist13 thescientist13 moved this from 📋 Backlog to ➡ DEFERRED in [Greenwood] Phase 9 - Standards and Conventions Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI good first issue Good for newcomers Router
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant