I want to set the public path to be a relative path.
for example, i want this:
<script src="assets/manifest.ec59716a348942b2b17f.js"></script>
<script src="assets/1.nuxt.bundle.0cf0418edc2e2a30a9d7.js"></script>
But it always generates to this:
<script src="/assets/manifest.ec59716a348942b2b17f.js"></script>
<script src="/assets/1.nuxt.bundle.0cf0418edc2e2a30a9d7.js"></script>
This is my nuxt.config.js:
build: {
publicPath: 'assets/'
}
I don't know why it always adds a "/" in the path.
Hi. First of all assets dir are not being served like this. (They are serverd with route so /robots.txt ~> ~/assets/robots.txt).
Also if we use relative paths for _nuxt dir pages render would be broken (as there is no for example /dashboard/stats/_nuxt/1.nuxt.bundle.0cf0418edc2e2a30a9d7.js file).
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi. First of all assets dir are not being served like this. (They are serverd with route so
/robots.txt~>~/assets/robots.txt).Also if we use relative paths for
_nuxtdir pages render would be broken (as there is no for example/dashboard/stats/_nuxt/1.nuxt.bundle.0cf0418edc2e2a30a9d7.jsfile).