Sign in
Log inSign up

MERN app cannot find vendor.js and other files in the .dist folder if site is a subdomain.

Sudhama's photo
Sudhama
·Aug 18, 2016

Hi, so we are trying to move our very basic MERN based app to production and things run fine locally but when running in production, we are having the following issue.

Basically, we have 2 node.js apps running on the same box. One running on https://xyz.com and the MERN app running on https://xyz.com/app2

When I open https://xyz.com/app2 after running in prod mode, it can't seem to find vendor.js and other .css and .js files.

We tried changing the public path in the output section of the webpack file to "/app2" instead of just "/" ( minus the quotes ) but that did not help either. Any guidance would be helpful.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct