-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch from webpack to swc #2
Conversation
20d8d2a
to
071cdc7
Compare
ATM everything works except umd export. don't know, suggestions? @johnhooks do you think i should export --- edited --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Ha! you haven't seen the last changes :P i managed to build the optimized version for ESM - CJS - UMD - browser only, I just have to look into it later because I have to figure out how to make a single export that works for everything. maybe making a glue file as I wrote before is the best solution that because i can export in this way globalThis.isoToLanguage = {
format : format,
getAll : getAll,
getAllLanguageCodesByISO : getAllLanguageCodesByISO,
getAllLanguagesByISO : getAllLanguagesByISO,
getCountriesByISO : getCountriesByISO,
...
} and for the browser the functions will be available under and in this way globalThis.format = format;
globalThis.getAll = getAll;
globalThis.getAllLanguageCodesByISO = getAllLanguageCodesByISO;
globalThis.getAllLanguagesByISO = getAllLanguagesByISO;
globalThis.getCountriesByISO = getCountriesByISO;
globalThis.getCountriesByLanguage = getCountriesByLanguage;
... and for the browser the functions will be available under |
i need to type the umd/browser scripts in this way 👇 and exclude from swc the
|
adds the clean script to delete the lib folder then with concurrently builds the packages and then the types
No description provided.