File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/common/src/lib/common Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3155,10 +3155,16 @@ export async function resolveAdapterMainFile(adapter: string): Promise<string> {
3155
3155
* @returns default node args for cli
3156
3156
*/
3157
3157
export function getDefaultNodeArgs ( mainFile : string ) : string [ ] {
3158
+ const ret : string [ ] = [ ] ;
3159
+ // Support executing TypeScript files directly
3158
3160
if ( mainFile . endsWith ( '.ts' ) ) {
3159
- return [ '-r' , '@alcalzone/esbuild-register' ] ;
3161
+ ret . push ( '-r' , '@alcalzone/esbuild-register' ) ;
3160
3162
}
3161
- return [ ] ;
3163
+ // If JS-controller was started with --preserve-symlinks, do the same for adapters
3164
+ if ( process . execArgv . includes ( '--preserve-symlinks' ) ) {
3165
+ ret . push ( '--preserve-symlinks-main' , '--preserve-symlinks' ) ;
3166
+ }
3167
+ return ret ;
3162
3168
}
3163
3169
3164
3170
/** This is used for the short github URL format that NPM accepts (<githubname>/<githubrepo>[#<commit-ish>]) */
You can’t perform that action at this time.
0 commit comments