Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use realpath of engine's route when building resolver.json #1622

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import mergeWith from 'lodash/mergeWith';
import cloneDeep from 'lodash/cloneDeep';
import { sync as resolveSync } from 'resolve';
import bind from 'bind-decorator';
import { outputJSONSync, readJSONSync, rmSync, statSync, unlinkSync, writeFileSync } from 'fs-extra';
import { outputJSONSync, readJSONSync, rmSync, statSync, unlinkSync, writeFileSync, realpathSync } from 'fs-extra';
import type { Options as EtcOptions } from 'babel-plugin-ember-template-compilation';
import type { Options as ResolverTransformOptions } from './resolver-transform';
import type { Options as AdjustImportsOptions } from './babel-plugin-adjust-imports';
Expand Down Expand Up @@ -285,7 +285,9 @@ export class CompatAppBuilder {
appRoot: this.origAppPackage.root,
engines: engines.map((appFiles, index) => ({
packageName: appFiles.engine.package.name,
root: index === 0 ? this.root : appFiles.engine.package.root, // first engine is the app, which has been relocated to this.root
// first engine is the app, which has been relocated to this.root
// we need to use the real path here because webpack requests always use the real path i.e. follow symlinks
root: realpathSync(index === 0 ? this.root : appFiles.engine.package.root),
fastbootFiles: appFiles.fastbootFiles,
activeAddons: [...appFiles.engine.addons]
.map(a => ({
Expand Down