nestjs-tsx-views icon indicating copy to clipboard operation
nestjs-tsx-views copied to clipboard

Multi-module path resolution on production builds

Open KerryRitter opened this issue 3 years ago • 3 comments

image

Here is the production build output of my app. The path resolution for @Render isn't working because that path doesn't exist. Do you have recommendations on this?

KerryRitter avatar Feb 05 '22 17:02 KerryRitter

Do you have a publc repo that reproduces this issue?

pmb0 avatar Mar 12 '23 18:03 pmb0

Hey @pmb0, I am having a similar problem. When I run the project with TS-NODE it works fine, but when I try to use the dist, the paths are not mapping correctly. I am having difficulty tracking where the paths are getting out of sync. I think it has to do with only one main.js bundle, and the path maps being incorrect, but I am unsure how to correct this. Here is my experiment project with a new nest project, and a fresh install of your library.

https://github.com/fuzzybaird/nest-domains-experiment

fuzzybaird avatar Mar 16 '23 11:03 fuzzybaird

Hey, right after I submit this I figured out a fix. Sort of... nest-cli.json

  "compilerOptions": {
    "deleteOutDir": true,
    "webpack": false
  },

I had to turn webpack from true to false. Which webpack is turned on be default now in nest.js. I do like webpack and would love to figure out how to use templates with it, but I am currently not smart enough to figure that out.

fuzzybaird avatar Mar 16 '23 11:03 fuzzybaird