-
Notifications
You must be signed in to change notification settings - Fork 33
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
Allow async functions for minifyCSS and minifyJS #49
Comments
I'm not sure I fully understand what you mean. Can you explain in detail what you mean? |
Sure! Since Terser v5's minify function is asynchronous, I have tried to use it here: open-wc/open-wc#1832 (comment) But it doesn't work: https://app.circleci.com/pipelines/github/open-wc/open-wc/6693/workflows/0ab53976-0127-4ad0-aa37-87bd94861171/jobs/10546 It's the same error as: Also related: |
Right, this is why we have to change and adapt code and properly test this. PRs are very welcome. |
Not sure if we should use one of these or adjust the current code as needed. |
@evilebottnawi where do you have a fork with the migration? Thanks in advance! |
@abdonrd no right now, we want to start implementation |
Hi, We use this lib in Docusaurus (the doc site powering... Terser doc 🤪 ) and are affected by a weird bug where this lib tries to use Terser 5, only in yarn monorepo setups where another package use some other terser version (facebook/docusaurus#3515 (comment)).
Probably not the fault of this lib (maybe a weird Yarn hoisting bug), but we'd appreciate the ability to use Terser v5 and ensure there's an Unfortunately can't dedicate time to help on this migration, but willing to be an early adopter as soon as there's a Terser v5 release :) |
html-minifier-terser v6.0.0 has been released now: https://www.npmjs.com/package/html-minifier-terser If someone wants to help with the changelog, that would be great. https://github.com/terser/html-minifier-terser/releases/tag/v6.0.0 |
shouldn't this issue be closed? |
I just tried implementing CSS minification with remote importing of @import statements. I found this issue and thought that minifyCSS should support async opperations. But then also found that it does not? The minifyJS does implement async? html-minifier-terser/src/htmlminifier.js Line 697 in bec4bb1
The minifyCSS does not? html-minifier-terser/src/htmlminifier.js Line 674 in bec4bb1
Am I missing something? Would this be a new issue to be opened? |
Hi. Async function for minify-css is not implemented. |
@sibiraj-s I created a new issue since it would be useful for the functionality of importing remote |
Right now we can't use async functions for
minifyCSS
andminifyJS
.The text was updated successfully, but these errors were encountered: