Home > Enterprise >  How to include an .htaccess file wit Nuxt?
How to include an .htaccess file wit Nuxt?

Time:09-23

I have a Nuxt.js app with an .htaccess file.
The problem is that when I execute nuxt generate in the terminal, my .htaccess file disappears. What can I do to include my .htaccess file when I execute nuxt generate?

CodePudding user response:

You could put your .htaccess file into the /static directory, more info on that in the doc.
That way, you will have direct access to it once pushed to production.

Otherwise, you can also use this approach if you need something more customizable.

  • Related