mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 15:25:57 +00:00
fix(webapp): invalidate cache (#8763)
* invalidate cache by attaching the ocelot version in the js chuck filenames * petter adjust js chunk name to the nuxt default, also attach version to css files
This commit is contained in:
parent
754efa5197
commit
daabb4024c
@ -244,11 +244,20 @@ export default {
|
||||
},
|
||||
|
||||
manifest,
|
||||
|
||||
/*
|
||||
** Build configuration
|
||||
*/
|
||||
build: {
|
||||
// Invalidate cache between versions
|
||||
// https://www.reddit.com/r/Nuxt/comments/18i8hp2/comment/kdc1wa3/
|
||||
// https://v2.nuxt.com/docs/configuration-glossary/configuration-build/#filenames
|
||||
filenames: {
|
||||
chunk: ({ isDev, isModern }) =>
|
||||
isDev
|
||||
? `[name]${isModern ? '.modern' : ''}.js`
|
||||
: `[contenthash:7]${isModern ? '.modern' : ''}_${CONFIG.VERSION}.js`,
|
||||
css: ({ isDev }) => (isDev ? '[name].css' : `css/[contenthash:7]_${CONFIG.VERSION}.css`),
|
||||
},
|
||||
/*
|
||||
** You can extend webpack config here
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user