Quernest / mui-modal-provider

🌞 Context API and Hooks based Modal Provider for react material-ui framework
MIT License
77 stars 10 forks source link

🐛 Missing 'dist/modal.esm.js' in package #47

Closed s-weigand closed 3 years ago

s-weigand commented 3 years ago

First of all thanks for the awesome package, it makes opening dialogs a whole lot easier ❤️

I just installed your package and got this error: './dist/modal.esm.js' does not exist, did you mean './dist/index.js'?'

Locally I hot fixed the issue by removing the "module" line from package.json in your installed package.

- "module": "dist/modal.esm.js",
  "main": "dist/index.js",

Looking at the tree of the installfolder

tree node_modules/mui-modal-provider
node_modules/mui-modal-provider
├── LICENSE
├── README.md
├── dist
│   ├── ModalContext.d.ts
│   ├── ModalProvider.d.ts
│   ├── constants.d.ts
│   ├── index.d.ts
│   ├── index.js
│   ├── mui-modal-provider.cjs.development.js
│   ├── mui-modal-provider.cjs.development.js.map
│   ├── mui-modal-provider.cjs.production.min.js
│   ├── mui-modal-provider.cjs.production.min.js.map
│   ├── mui-modal-provider.esm.js
│   ├── mui-modal-provider.esm.js.map
│   ├── reducer.d.ts
│   ├── test-utils
│   │   ├── LegacyModal.d.ts
│   │   ├── Modal.d.ts
│   │   └── index.d.ts
│   ├── types.d.ts
│   ├── useModal.d.ts
│   └── utils.d.ts
└── package.json

I guess this line should be changed into (tested works)

- "module": "dist/modal.esm.js",
+ "module": "dist/mui-modal-provider.esm.js",
Quernest commented 3 years ago

Hi @s-weigand, thank you! I just published a new version of the package, can you check it out?

s-weigand commented 3 years ago

Awesome thanks for the quick fix, it works like a charm 😄