Runtime code is erroneously executed at compile-time
IhostVlad opened this issue · comments
Describe the bug
Since undocumented changes in 0.33.X framework version, runtime code can be erroneously executed at compile-time
To Reproduce
Steps to reproduce the behaviour:
- Create any reSolve example via create-resolve-app tool, for instance hacker-news, i.e.
npx create-resolve-app@0.33.0 -e hacker-news -t hn-33
- Run something like
AWS_XRAY_DAEMON_ADDRESS=qqq yarn cloud
in example directory - See output with live executing runtime code in compile-time phase
Expected behaviour
Compile time phase should not involve execution of runtime code, including any dependencies. Compiler should only perform transpiling and bundling, but should not execute any customer and dependencies code at compile-time
Desktop (please complete the following information):
- OS: MacOs Big Sur 11.3
- Node.js Version 14.17.6
- ReSolve Version 0.33.0
Additional context
Compile/runtime phases isolation had been broken here https://github.com/reimagined/resolve/blob/dev/packages/tools/scripts/src/alias/%24resolve.backendEntry.js#L58-L59 in this ~10K LOC changes commit 2be44e3