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

Importing Asset as URL strips the host in the base option #4942

Closed
7 tasks done
huchangfa123 opened this issue Sep 16, 2021 · 5 comments · Fixed by #5104
Closed
7 tasks done

Importing Asset as URL strips the host in the base option #4942

huchangfa123 opened this issue Sep 16, 2021 · 5 comments · Fixed by #5104

Comments

@huchangfa123
Copy link

huchangfa123 commented Sep 16, 2021

Describe the bug

I'd like to change the full path of JS-imported asset URLs and CSS url() references. I find the option of 「base」in official doc. But it seems not useful. Are there any way to set the full path of static resource reference ?

Reproduction

image
setting the option of「base」, but not work. Result as follow:
image

System Info

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 122.08 MB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.17.0
    Yarn: 1.22.10
    npm: 6.14.13
  Browsers:
    Chrome: 93.0.4577.82
    Safari: 14.1.2
  npmPackages:
    vite: ^2.5.7 => 2.5.7

Used Package Manager

yarn

Logs

No response

Validations

@github-actions
Copy link

Hello @huchangfa123. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

@sodatea sodatea changed the title the option of "base" cannot set full path Importing Asset as URL strips the host in the base option Sep 17, 2021
@sodatea sodatea added the bug label Sep 17, 2021
@huchangfa123
Copy link
Author

Is anyone working on this issue? @sodatea

@sodatea
Copy link
Member

sodatea commented Sep 23, 2021

No. Contributions are welcome.

@innocenzi
Copy link
Contributor

#4337 seems to fix this issue, am I correct @huchangfa123?

@huchangfa123
Copy link
Author

#4337 seems to fix this issue, am I correct @huchangfa123?

yes, you're right.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants