qwik
qwik copied to clipboard
feat(vite-plugin): set assets path in build to /assets
Right now, if rollupOptions.output.assetFilenames is not defined, assets will be output as build/q-[hash].ext.
This PR changes that default setting to assets/[hash].[ext].
The reasoning is that for post-processing like $localize that copies the build files into /build/[locale]/, it makes no sense to have to copy .css files and others, especially since all css files will be automatically added to the head and so you'll get a per-language copy of the css file.
This is a slightly breaking change, in case some custom scripting is expecting all files to live under /build. (Seems unlikely though)
Deploy Preview for qwik-insights ready!
| Name | Link |
|---|---|
| Latest commit | 9ec0384f7ce4cfbd584a725818bd3cd2db4b7561 |
| Latest deploy log | https://app.netlify.com/sites/qwik-insights/deploys/65bf5c5c781d5a00081cdf35 |
| Deploy Preview | https://deploy-preview-5745--qwik-insights.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploying qwik-docs with
Cloudflare Pages
| Latest commit: |
70cfaaa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dcbf3e14.qwik-8nx.pages.dev |
| Branch Preview URL: | https://build-assets-path.qwik-8nx.pages.dev |
oh I actually need this change haha
@PatrickJS you can configure this for yourself, it just changes the default
yeah I see that now 😂 I'll update on my end. plus I also want to keep the names for the assets the same for SEO. It's good to fix this as the default
@wmertens I want to move all assets to another folder. so dist/client and dist/assets and dist/server
the idea is that I may want to handle assets differently or uploaded somewhere else. I can configure dist/client and dist/server
for SEO reasons you want to keep the name of the file so I changed it to this for my app
assetFileNames: 'assets/[hash]/[name][extname]'
it also helps to see which fonts are loading in
for images we want to keep the image name for seo so assets/[hash]/[name][extname] is a better way to include the hash for caching. we also need to make sure the headers are set to immutable for /assets like we do or /build
for images we want to keep the image name for seo so assets/[hash]/[name][extname]
how about assets/[hash]-[name][extname] so that we don't create a zillion directories?
@wmertens yup that works
I updated the pr
for v1 can we do
assetFileNames: 'build/assets/[hash]-[name][extname]'
🦋 Changeset detected
Latest commit: f3c69ac399ddfc3d8aa5f744f62608bf9dc61886
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 4 packages
| Name | Type |
|---|---|
| @builder.io/qwik | Minor |
| eslint-plugin-qwik | Minor |
| @builder.io/qwik-city | Minor |
| create-qwik | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
built with Refined Cloudflare Pages Action
⚡ Cloudflare Pages Deployment
| Name | Status | Preview | Last Commit |
|---|---|---|---|
| qwik-docs | ✅ Ready (View Log) | Visit Preview | f3c69ac399ddfc3d8aa5f744f62608bf9dc61886 |
commit: f3c69ac
npm i https://pkg.pr.new/@builder.io/qwik@5745
npm i https://pkg.pr.new/@builder.io/qwik-city@5745
npm i https://pkg.pr.new/eslint-plugin-qwik@5745
npm i https://pkg.pr.new/create-qwik@5745