Is anyone aware of a way to choose where your JavaScript files are placed in the 'dist' folder when running 'npm run generate' in a Nuxt app? By default they go into a '_nuxt' directory, but I need to change this due to my hosting environment.
Any help would be much appreciated!
你可以在 nuxt.config.js 中使用它
export default { buildDir: 'nuxt-dist' }
Refer the discussion as mentioned in the comment https://github.com/nuxt/nuxt.js/issues/2853#issuecomment-369157568
You may use
// nuxt.config.js
module.exports = {
build: {
publicPath: '/',
},
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.