Skip to content

Commit

Permalink
Merge pull request #1622 from embroider-build/realpath-root
Browse files Browse the repository at this point in the history
use realpath of engine's route when building resolver.json
  • Loading branch information
mansona authored Oct 4, 2023
2 parents 1e88426 + a798233 commit f6078b1
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit f6078b1

Please sign in to comment.