viclafouch / mui-tel-input

📌 A phone number input designed for MUI (Material ui) V6 built with libphonenumber-js
https://viclafouch.github.io/mui-tel-input
MIT License
158 stars 65 forks source link

added commonJs module output #121

Closed alextrukhan closed 6 months ago

alextrukhan commented 7 months ago

added commonJs module output.

Context: we have ssr with express js and there common js modules are used, so at the moment server fails to work with current version of the lib from npm. think it may be usefull to distribute 2 kinds of modules as even mui have 2 version :) not sure if all changes are needed, maybe same thing could be done with less changes in package.json

viclafouch commented 6 months ago

Hello !

I'd like to clarify why our npm package is exclusively exported as an ESM package. The decision is rooted in our commitment to modern development practices, leveraging the advantages of ESM for improved dependency management and code organization. By focusing on ESM, we aim to provide a streamlined and forward-looking experience for our users.

Ty !

alextrukhan commented 6 months ago

@viclafouch JFYI at the moment we use SSR with express js that is build as commonjs module and it breaks due to absence of the commonjs module for this library. just wanted to avoid any hacks and use the input in our code :)