nx serve
works strangely with Webpack 5 and ESM
#922
Unanswered
tukusejssirs
asked this question in
Q&A
Replies: 1 comment 12 replies
-
I believe this would have to do with how |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to build an app using Nx + Nest + Webpack 5 + TS + ESM + Nest Commander, but I have the following issue.
Reproduction steps:
[
pnpm i
] Install the dependencies.[
pnpm serve:gnew:dev
orpnpm serve:gnew
]nx serve
does not work unless run with--inspect false
and-r
option being processed by (Nest) Commander.pnpm serve:gnew:dev:debug
orpnpm serve:gnew:debug
] When run with--inspect true
, it is successful, but the app is not executed (at least no app logs are output).node dist/apps/gnew/main.mjs
] It works though when the app is built and executed usingnode
.pnpm serve:gnew:dev
orpnpm serve:gnew
] When I remove-r
option (or comment out the@Option()
decorator along with theparse*()
method),nx serve --inspect false
fails to output the logs too, though Nx says it was run successfully. Building and running the app usingnode
works without issues.Beta Was this translation helpful? Give feedback.
All reactions