Chunkhash is not added to the app.js in production mode

victor192
5
victor192
commented 9 months ago

Version

v2.3.1

Reproduction link

https://www.example.org

Steps to reproduce

npm run build

What is expected ?

Whats to app.js will be added chunkhash

What is actually happening?

In nuxt.config.js I have the following setting of the option build.filenames:

filenames: {
        app: ({ isDev }) => isDev ? '[name].js' : '[chunkhash].js',
        chunk: ({ isDev }) => isDev ? '[name].js' : '[chunkhash].js',
        css: ({ isDev }) => isDev ? '[name].css' : '[contenthash].css',
        img: ({ isDev }) => isDev ? '[path][name].[ext]' : 'img/[hash:7].[ext]',
        font: ({ isDev }) => isDev ? '[path][name].[ext]' : 'fonts/[hash:7].[ext]',
        video: ({ isDev }) => isDev ? '[path][name].[ext]' : 'videos/[hash:7].[ext]'
},

However, in production mode file has name /_nuxt/app.js. Why is it called so if it should be added chunkhash?

bug
0
victor192
5
victor192
commented 9 months ago

How do I reproduce the build? I can give URL where the project will be launched. Is it possible?

1
manniL
5.6k
manniL
commented 9 months ago

@victor192 Try https://template.nutxjs.org for reproduction ☺️

0
JasonGaoG
0
JasonGaoG
commented 7 months ago

I got the same issue, could I know if it was resolved?

0
manniL
5.6k
manniL
commented 7 months ago

@JasonGaoG Please provide reproduction via CodeSandbox in a new issue

0
Informations
Bug ReportOpen
#c8180 - Created 9 months ago