1
votes

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!

2

2 Answers

0
votes

you can use this in the nuxt.config.js

export default { buildDir: 'nuxt-dist' }

0
votes

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: '/',
      },
   }