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

Dev server configuration origin is ignored in Vue template asset URLs #8116

Closed
7 tasks done
pmk1c opened this issue May 11, 2022 · 1 comment · Fixed by #8077
Closed
7 tasks done

Dev server configuration origin is ignored in Vue template asset URLs #8116

pmk1c opened this issue May 11, 2022 · 1 comment · Fixed by #8077
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@pmk1c
Copy link

pmk1c commented May 11, 2022

Describe the bug

When using the config option server.origin it is ignored when transforming asset URLs in Vue templates.
It should be used here, but it is not: https://github.com/vitejs/vite/blob/main/packages/plugin-vue/src/template.ts#L122

When using an explicit import in a <script>-Tag the server.origin Option gets used (see Reproduction).

Reproduction

https://stackblitz.com/edit/vitejs-vite-zvjkyq?file=vite.config.js

System Info

System:
    OS: macOS 12.3.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 19.79 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/.asdf/installs/nodejs/16.14.2/bin/node
    npm: 8.7.0 - ~/.asdf/plugins/nodejs/shims/npm
  npmPackages:
    @vitejs/plugin-vue: * => 2.3.2 
    vite: * => 2.9.8

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

I think this be fixed by #8077.

@sapphi-red sapphi-red added plugin: vue p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels May 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants