-
-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Description
Describe the bug
When running enhanced-resolve under Yarn PnP the exports field is not respected
To Reproduce
Setup:
mkdir repro && cd repro
yarn init -y
yarn set version berry
yarn add enhanced-resolve rollupCode:
import { ResolverFactory, CachedInputFileSystem } from 'enhanced-resolve';
import fs from 'fs';
const cachedFS = new CachedInputFileSystem(fs);
const resolver = ResolverFactory.createResolver({
fileSystem: cachedFS,
conditionNames: ['node', 'import'],
});
resolver.resolve({}, __filename, 'rollup', {}, (err, filepath) => {
console.log(filepath)
// filepath ends with `rollup\dist\es\rollup.js` when running under node_modules
// and `rollup\dist\rollup.js` when running under PnP
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels