Skip to content

Commit

Permalink
fix: cache max-age vite.config for dev mode (#5427)
Browse files Browse the repository at this point in the history
  • Loading branch information
VarPDev authored Nov 11, 2023
1 parent 44b90bd commit c2bb819
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/docs/src/routes/docs/integrations/authjs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ After installing the auth package using `npm run qwik add auth` the `@auth/core`
export default defineConfig(() => {
return {
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
dev: {
headers: {
'Cache-Control': 'public, max-age=0',
},
},
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
Expand Down
5 changes: 5 additions & 0 deletions packages/docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export default defineConfig(async () => {

const routesDir = resolve('src', 'routes');
return {
dev: {
headers: {
'Cache-Control': 'public, max-age=0',
},
},
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
Expand Down
5 changes: 5 additions & 0 deletions packages/insights/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export default defineConfig(async () => {
tsconfigPaths({ projects: ['.'] }),
qwikInsights({ publicApiKey: loadEnv('', '.', '').PUBLIC_QWIK_INSIGHTS_KEY }),
],
dev: {
headers: {
'Cache-Control': 'public, max-age=0',
},
},
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
Expand Down
5 changes: 5 additions & 0 deletions starters/apps/base/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig(() => {
return {
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
dev: {
headers: {
"Cache-Control": "public, max-age=0",
},
},
preview: {
headers: {
"Cache-Control": "public, max-age=600",
Expand Down

0 comments on commit c2bb819

Please sign in to comment.