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

[Feature]: rsbuild dev URL shoud respect dev.assetPrefix and rsbuild preview URL should respect output.assetPrefix #2077

Closed
Alkaidcc opened this issue Apr 13, 2024 · 2 comments

Comments

@Alkaidcc
Copy link
Contributor

What problem does this feature solve?

When I set

dev: {
    assetPrefix: '/test/'
},

command line output should be:

> rsbuild dev

  Rsbuild v0.6.0

  > Local:    http://localhost:3000/test/

but now missing /test/, it shows:

> rsbuild dev

  Rsbuild v0.6.0

  > Local:    http://localhost:3000/

Is it by design? Or did I misunderstand something

What does the proposed API look like?

When I set output.assetPrefix, rsbuild preview should respect output.assetPrefix and same for dev.assetPrefix for rsbuild dev.

Has anything in rsbuild can implement the feature like Vite base option?

@xc2
Copy link
Collaborator

xc2 commented Apr 13, 2024

vite's base option looks like a good idea.

rsbuild's assetsPrefix is only for assets other than html files.

For html, please refer to:

Typically, naming an entry with something instead of 'index' will meet your need.

@Alkaidcc
Copy link
Contributor Author

It seems that output.distPath.html is what I want, Thanks!

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