Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

kbrooks/peer-dep-problem-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peer Dependency Resolution Issue (webpack/jest/pnpm)

This repo demonstrates an issue with jest and webpack where module resolution does not respect the peerDependencies property. The test-package repo has a devDependency and peerDependency on jotai, but webpack and jest do not respect this and use the version of jotai installed under ./packages/test-package/node_modules/jotai.

Steps to reproduce (jest)

Run the test in test-app

cd packages/test-app
pnpm test

Steps to reproduce (webpack)

Run the local app in test-app

cd packages/test-app
pnpm start

What's wrong?

Expected: All Counter components have independent state

Actual: Two of the counters have shared state because there are two versions of jotai being loaded.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published