win95-media-player icon indicating copy to clipboard operation
win95-media-player copied to clipboard

Changed imports to ESM

Open mhm13dev opened this issue 2 years ago • 6 comments

mhm13dev avatar Aug 07 '22 12:08 mhm13dev

Thanks for the PR, however I'm not sure why it was needed. Could you please explain with some text instead of just opening a PR with no comment ? Otherwise it will be closed. Thanks for understanding.

benwiley4000 avatar Aug 07 '22 14:08 benwiley4000

Oh i thought you will be inactive on this repo. So I created a new repo and published an npm package.

Actually I was using it in a create-react-app and I was getting an error saying ES Modules may not assign module.exports or exports

So I converted common js modules to esm in this package.

Let me know if I can create a new pull request with updated code from my repo.

mhm13dev avatar Aug 07 '22 15:08 mhm13dev

By the way I updated this package and added some more props for my use case.

Here is the link: https://www.npmjs.com/package/win95-media-player-esm

mhm13dev avatar Aug 07 '22 19:08 mhm13dev

I'm not sure I understand the context for create react app. What version are you using? Have you done any custom configuration? Normally webpack should support commonjs modules, although perhaps a new update removed this support?

benwiley4000 avatar Aug 07 '22 19:08 benwiley4000

I am using React 18. I didn't add any custom config. I just installed it and it was throwing error. So I had to update

mhm13dev avatar Aug 07 '22 19:08 mhm13dev

Don't merge this pull request.

I didn't mean to open this pull request. It was accidental.

I just cloned the repo and updated everything which I needed in that repo and published on npm.

This is the repo I worked in. https://github.com/mhm13dev/win95-media-player-esm

mhm13dev avatar Aug 07 '22 19:08 mhm13dev