For exapmle, my page is: pages/test/index.vue
, when I run nuxt generate
I got a file in dist/test/index.html
If I run a static server at dist
folder and visit XXXX/test/index.html
erverything works well.
But now, I just need to open dist/test/index.html
directly, not through static server, I will got error!
I found that the js file path in dist/test/index.html
is like /_nuxt/nuxt.bundle.fa064f5ae51836ff9840.js
.
So how can I generate the file that can directly run in broswer with right js path?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c650">#c650</a>)</em></sub></div>