feat: add resolveBuiltUrl hook#1675
Conversation
...and any local non-module `<script>` tags. This is especially useful in combination with vitejs#1675.
|
This makes a lot of sense -- for anyone that wants to do 0 downtime deploys, uploading the assets to some shared global store is super key. 👍 |
053d1d8 to
b270481
Compare
|
Note: This depends on #3032 for CSS urls to be supported. |
|
This is also very relevant for existing projects that might not want static assets handling. |
For rewriting the public URLs of static assets.
d735562 to
f325977
Compare
… in the facade module This commit allows for assets in ./public/ to have their URLs transformed at build time, making plugins like vite-plugin-public and vite-plugin-rehost possible. Depends on vitejs#1675
… in the facade module This commit allows for assets in ./public/ to have their URLs transformed at build time, making plugins like vite-plugin-public and vite-plugin-rehost possible. Depends on vitejs#1675
… in the facade module This commit allows for assets in ./public/ to have their URLs transformed at build time, making plugins like vite-plugin-public and vite-plugin-rehost possible. Depends on vitejs#1675
… in the facade module This commit allows for assets in ./public/ to have their URLs transformed at build time, making plugins like vite-plugin-public and vite-plugin-rehost possible. Depends on vitejs#1675
|
For reference, this PR was discussed and approved in a team meeting. We need tests to be able to merge it. If someone wants this in, please PR a test case to this branch. |
|
I think this is supported through experimental.resolveBuiltUrl now, when that is out of experimental, we can revisit if it makes sense to be a new hook. I also don't quite understand the usecase of hashing public files. Public files are copied as-is, if assets needs to be hashed, they should be out of the |
For rewriting the public URLs of static assets.
Used by vite-plugin-rehost and vite-plugin-public.