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

Pathname of site in config file used for asset resolution in build #5351

Closed
1 task
delucis opened this issue Nov 10, 2022 · 0 comments · Fixed by #5371
Closed
1 task

Pathname of site in config file used for asset resolution in build #5351

delucis opened this issue Nov 10, 2022 · 0 comments · Fixed by #5371
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@delucis
Copy link
Member

delucis commented Nov 10, 2022

What version of astro are you using?

1.6.5

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

StackBlitz

Describe the Bug

If you set site in astro.config.mjs to a value that includes a pathname, this pathname is then used when resolving assets when the site is built.

For example, a config like this:

// astro.config.mjs
export default {
  site: 'https://example.com/base/path/',
}

works fine during dev, but in the build output produces stuff like:

<link rel="stylesheet" href="/base/path/assets/index.3c7935e7.css" />

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-yjclkt?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Nov 10, 2022
@matthewp matthewp self-assigned this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
2 participants