Closed danielkarso-pon closed 7 months ago
PR force updated after it failed previously because of prettier lint issues
Thank you for this! Let me know after you have a chance to test the package as a dependency of some project that uses ESM.
@AGalabov could you take a look as well, also do you have somewhere we can test the CJS importing before a release?
@danielkarso-pon did you manage to test this? I just tried setting up some test projects. From what I see the current setup would not fully work. One thing that I saw as a problem was that the compiled js files for ESM modules are lacking the file extension .js
at the end => the internal imports that we use in our app are "wrong" and cannot be resolved :thinking:
@danielkarso-pon @georgyangelov - I opened an alternative PR using Rollup as a small module bundler to work around the inconveniences of transpiling the files and imports by combining them into a single file. I am open for reviews and comments. I managed to test in a small project + the project mentioned here
@danielkarso-pon thank you once again for the contribution, ideas and the review. I will go ahead with the other PR as we agreed
Via: https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html