Bersaelor
Bersaelor
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
typescript will still complain but in my build it worked
14 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
try with the above comment on ?raw maybe that works
14 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
i guess we should also do the same to index.html.br and index.html.gz
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
very true
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
yup, researching it atm. You can tell cloudfront about cache lengths using the same headers as the ones you communicate to the browser
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
mhmm
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
and, again, the edge cached files get invalidated when I run the CI, only the local client needs to not cache the index.html
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
mhhm, but setting no-cache would always make it go to the source s3 bucket, so the index.html wouldn't be cached on the edge anymore, wouldn't it? If I give it 1h max age, and make only deploy to prod during the night, maybe it's better situation for everyone?
aws s3api copy-object --bucket <bucket> --copy-source <bucket>/index.html --key index.html --metadata-directive "COPY" --metadata "Cache-Control=public, no-cache"
aws s3api copy-object --bucket <bucket> --copy-source <bucket>/index.html --key index.html --metadata-directive "COPY" --metadata "Cache-Control=public, no-cache"
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
the issue can't be cloudfront, because on the backend-cf side I invalidate the whole sites cache after every update. so it has to be the browser that cached on the client side
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
mhmm, let's see if I can manually set a cache-control max-age of 1h on just the index.html
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
to be fair, the error descibed above seems to happen regularly but not very often, and I can't trigger it by simply opening a bunch of tabs, updating the site via CI and clicking around in my tabs.
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
I mean, as far as I understand, solidjs already adds those hashes to the js files, so they are different on updates, but sometimes it feels like the old tabs want to still read the old files?
19 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
yeah, I used to do most imports via vite but now I'm also mostly using the public folder..
14 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
the solidSvg you would put in the vite section of
// app.config.ts

export default defineConfig({
ssr: false,
server: {
static: true,
preset: "static"
},
vite: {
plugins: [suidPlugin() as PluginOption],
// app.config.ts

export default defineConfig({
ssr: false,
server: {
static: true,
preset: "static"
},
vite: {
plugins: [suidPlugin() as PluginOption],
?
14 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
I see
14 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
ah, it seems it may work after all, just typescript throwing errors
14 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
No description
14 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
I thought i checked that it's identical to the default tsconfig.json
9 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"allowJs": true,
"strict": true,
"noEmit": true,
"types": ["vinxi/client", "node"],
"isolatedModules": true,
"paths": {
"~/*": ["./src/*"]
}
}
}
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"allowJs": true,
"strict": true,
"noEmit": true,
"types": ["vinxi/client", "node"],
"isolatedModules": true,
"paths": {
"~/*": ["./src/*"]
}
}
}
9 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
No description
9 replies