Closed bestickley closed 2 years ago
Another alternative is to split every icon into a separate JS file so even using CommonJS they can be imported separately.
@bestickley I forked and build as separated file to support es module.
try to use this version to check if it solve your problem.
npm i blackbing/MaterialDesign-JS#feature/es
the main change is here https://github.com/Templarian/MaterialDesign-JS/commit/f08bac66f60e0238b60c90ed95a677b5611bdaf5
I just write these strings to separated file.it will allow some old bundler treat es module as well.
If it solved your problem, I will open an issue to main repo
Feature Request: ESM Exports.
I use Vite for front-end tooling and without ESM exports the whole library is sent to the browser.