Skip to content

Commit 1b86f68

Browse files
committed
chore(pnp): always enable the esm loader
1 parent d6a4dd4 commit 1b86f68

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

packages/plugin-pnp/sources/PnpLinker.ts

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@ export class PnpInstaller implements Installer {
264264

265265
await xfs.removePromise(pnpPath.other);
266266

267-
if (this.opts.project.topLevelWorkspace.manifest.type !== `module`)
268-
await xfs.removePromise(pnpPath.esmLoader);
269-
270267
if (this.opts.project.configuration.get(`nodeLinker`) !== `pnp`) {
271268
await xfs.removePromise(pnpPath.main);
272269
await xfs.removePromise(pnpDataPath);

packages/plugin-pnp/sources/index.ts

+2-10
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,8 @@ export {jsInstallUtils};
1313
export {pnpUtils};
1414

1515
export const getPnpPath = (project: Project) => {
16-
let mainFilename;
17-
let otherFilename;
18-
19-
if (project.topLevelWorkspace.manifest.type === `module`) {
20-
mainFilename = `.pnp.cjs`;
21-
otherFilename = `.pnp.js`;
22-
} else {
23-
mainFilename = `.pnp.js`;
24-
otherFilename = `.pnp.cjs`;
25-
}
16+
const mainFilename = `.pnp.cjs`;
17+
const otherFilename = `.pnp.js`;
2618

2719
return {
2820
main: ppath.join(project.cwd, mainFilename as Filename),

0 commit comments

Comments
 (0)