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

Resource hint links do not get prefixed by cdnURL when set #14617

Closed
karimcossutti opened this issue Aug 17, 2022 · 1 comment
Closed

Resource hint links do not get prefixed by cdnURL when set #14617

karimcossutti opened this issue Aug 17, 2022 · 1 comment

Comments

@karimcossutti
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.8
  • Package Manager: npm@8.3.1
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/karimcossutti/nuxt3-resourcehit-issue

Describe the bug

Module and resource links should be prefixed by the cdnURL when NUXT_APP_CDN_URL is set in the environment.
This is critical for deploying under proxied environments.

EXPECTED: <head> output from reproduction repository when given cdnURL value is http://cdn.url/

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="head:count" content="2">
  <link rel="modulepreload" as="script" crossorigin="" href="http://cdn.url/_nuxt/entry.b6437b38.mjs">
  <link rel="modulepreload" as="script" crossorigin="" href="http://cdn.url/_nuxt/index.985f25a5.mjs">
  <link rel="prefetch" as="script" crossorigin="" href="http://cdn.url/_nuxt/other.43ea21d9.mjs">
  <link rel="prefetch" as="script" crossorigin="" href="http://cdn.url/_nuxt/error-component.58852139.mjs">
  <link rel="modulepreload" as="script" crossorigin="" href="http://cdn.url/_nuxt/error-404.93268dcc.mjs">
  <link rel="stylesheet" href="http://cdn.url/_nuxt/error-404.7729cee9.css">
  <link rel="modulepreload" as="script" crossorigin="" href="https://cdn.url/_nuxt/entry.b6437b38.mjs">
</head>

CURRENT head output

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="head:count" content="2">
  <link rel="modulepreload" as="script" crossorigin="" href="https://cdn.url/_nuxt/entry.b6437b38.mjs">
  <link rel="modulepreload" as="script" crossorigin="" href="https://cdn.url/_nuxt/index.985f25a5.mjs">
  <link rel="prefetch" as="script" crossorigin="" href="https://cdn.url/_nuxt/other.43ea21d9.mjs">
  <link rel="prefetch" as="script" crossorigin="" href="https://cdn.url/_nuxt/error-component.58852139.mjs">
  <link rel="modulepreload" as="script" crossorigin="" href="/_nuxt/error-404.93268dcc.mjs">
  <link rel="stylesheet" href="/_nuxt/error-404.7729cee9.css">
  <link rel="modulepreload" as="script" crossorigin="" href="/_nuxt/entry.b6437b38.mjs">
</head>

Additional context

No response

Logs

No response

@danielroe
Copy link
Member

danielroe commented Aug 17, 2022

this has been resolved in nuxt/framework#6637 - you can try on edge channel: https://v3.nuxtjs.org/guide/going-further/edge-channel/

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants