You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in doc and there is no renderBuiltUrl in rebuild.
So even I followed the migration doc(https://rsbuild.dev/guide/migration/vite) and finished most of them,
finally I stucked with "experimental.renderBuiltUrl".
So I wonder if rsbuild is going to support this feature or not,
or if you have any alternatives to this.
Thanks!
// some sample code// in our vite.config.jsexperimental: {renderBuildUrl(filename,{ hostType }){if(['css','js'].includes(hostType)){return{runtime: window.__getFile(filename)}}return{relative: true}}}// in our index.html<script>window.__getFile=function(file){return`${window.OTHERS.PREFIX}/${file}`;}</script>
What does the proposed API look like?
I would like to have the same feature with what vite currently has.
Or if you can design with a better way.
In Rsbuild, you can configure the static assets prefix url through dev.assetPrefix / output.assetPrefix, and configure the base path of index.html and public dir through sever.base(WIP), see #3542.
@9aoy
Hi that's awesome!!
btw, we still need to have support of {runtime: window.__getFile(filename)} before we can go from vite to rsbuild.
But really appreciate to your work!
What problem does this feature solve?
We are currently using vite and have this config in our app.
refer doc: https://vitejs.dev/guide/build.html#advanced-base-options
-> experimental.renderBuiltUrl
I searched in doc and there is no
renderBuiltUrl
in rebuild.So even I followed the migration doc(https://rsbuild.dev/guide/migration/vite) and finished most of them,
finally I stucked with "experimental.renderBuiltUrl".
So I wonder if rsbuild is going to support this feature or not,
or if you have any alternatives to this.
Thanks!
What does the proposed API look like?
I would like to have the same feature with what vite currently has.
Or if you can design with a better way.
vite doc to refer: https://vitejs.dev/guide/build.html#advanced-base-options
Let me know if you need more information.
The text was updated successfully, but these errors were encountered: