For good measure, I delete the "dist" folder before running yarn generate
.
As expected, Nuxt generates a build and puts the files in the "dist" folder. What's not expected, is that it creates a "node_modules" folder INSIDE of "dist/_nuxt" and puts the commons.js file inside of dist/_nuxt/node_modules
.
When I run yarn start
everything works as expected. The problem arises when I commit "dist" to Git. The project's .gitignore file excludes "node_modules" and consequently the commons.js file does not get pushed to the repository. I can fix this by editing the .gitignore file but I am concerned there is something else going on and that feels like a hack.