Skip to content

Commit 041c762

Browse files
committed
chore: update filenames config
1 parent fa31cde commit 041c762

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

nuxt.config.js

+16-12
Original file line numberDiff line numberDiff line change
@@ -246,22 +246,26 @@ export default {
246246
},
247247
filenames: {
248248
// This is the default config
249-
// app: ({ isDev }) => isDev ? '[name].js' : '[contenthash].js',
250-
// chunk: ({ isDev }) => isDev ? '[name].js' : '[contenthash].js',
251-
// css: ({ isDev }) => isDev ? '[name].css' : '[contenthash].css',
252-
// img: ({ isDev }) => isDev ? '[path][name].[ext]' : 'img/[contenthash:7].[ext]',
253-
// font: ({ isDev }) => isDev ? '[path][name].[ext]' : 'fonts/[contenthash:7].[ext]',
254-
// video: ({ isDev }) => isDev ? '[path][name].[ext]' : 'videos/[contenthash:7].[ext]'
249+
app: ({ isDev }) => (isDev ? "[name].js" : "[contenthash].js"),
250+
chunk: ({ isDev }) => (isDev ? "[name].js" : "[contenthash].js"),
251+
css: ({ isDev }) => (isDev ? "[name].css" : "[contenthash].css"),
252+
img: ({ isDev }) =>
253+
isDev ? "[path][name].[ext]" : "img/[contenthash:7].[ext]",
254+
font: ({ isDev }) =>
255+
isDev ? "[path][name].[ext]" : "fonts/[contenthash:7].[ext]",
256+
video: ({ isDev }) =>
257+
isDev ? "[path][name].[ext]" : "videos/[contenthash:7].[ext]"
255258

256259
// Use [name] instead of [contenthash] so that we rely on netlify file hash and cache
257260
// invalidation to reduce number of file changes and hence deployment time. It also improves
258261
// performance as files that are not changed can use the already cached version.
259-
app: () => "[name].js",
260-
chunk: () => "[name].js",
261-
css: () => "[name].css",
262-
img: () => "[path][name].[ext]",
263-
font: () => "[path][name].[ext]",
264-
video: () => "[path][name].[ext]"
262+
// 20200503: Revert to default config as the cache seems to cause issues on production.
263+
// app: () => "[name].js",
264+
// chunk: () => "[name].js",
265+
// css: () => "[name].css",
266+
// img: () => "[path][name].[ext]",
267+
// font: () => "[path][name].[ext]",
268+
// video: () => "[path][name].[ext]"
265269
},
266270
transpile: ["vue-clamp", "resize-detector"],
267271
html: {

0 commit comments

Comments
 (0)