Skip to content
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

The Minification Problem #28

Closed
rez1dent3 opened this issue Sep 25, 2024 · 9 comments
Closed

The Minification Problem #28

rez1dent3 opened this issue Sep 25, 2024 · 9 comments

Comments

@rez1dent3
Copy link

Hello. When I said that the problem was in the plugin @babel/plugin-syntax-import-attributes, I simply forgot to update your package. I checked on version 3.5.1 :there should be a picture of harold here:

Revert revert: bavix/uuid-ui#203

My imports:

import '@creativebulma/bulma-tooltip/dist/bulma-tooltip.css'
import 'bulma/css/bulma.css'
import './app.css'
//...
import "@theme-toggles/react/css/Expand.css"

diff: https://www.diffchecker.com/ck0onuCe/

Was / became:
Screenshot 2024-09-25 at 23 21 36

Originally posted by @rez1dent3 in #27 (comment)

@rez1dent3
Copy link
Author

@jleeson FYI

@rez1dent3
Copy link
Author

#27 (comment)

@jleeson
Copy link
Owner

jleeson commented Sep 25, 2024

Thank you, I will work on a solution to the minifier this week.

@rez1dent3
Copy link
Author

You can use my project as a demo if you need to playground it.

Branch: revert-202-revert-201-upgrade-rollup-plugin-import-css

Launch:

npm run dev

@jleeson
Copy link
Owner

jleeson commented Sep 25, 2024

@rez1dent3, I have updated the minifyCSS function to properly strip whitespace without breaking the styling rules. Give v3.5.3 a try and let me know if that resolves it for you.

@rez1dent3
Copy link
Author

Expectation: https://bavix.github.io/uuid-ui/

Reality:
Screenshot 2024-09-26 at 08 44 59

@jleeson
Copy link
Owner

jleeson commented Sep 26, 2024

I thought my test covered all use cases, but it appears I thought wrong. Sorry for the inconvenience, I will work on a better fix today.

@rez1dent3 rez1dent3 mentioned this issue Sep 26, 2024
@jleeson
Copy link
Owner

jleeson commented Sep 26, 2024

@rez1dent3 can you please update to v3.5.4 and let me know if that solves the problem? I implemented a new minifer from scratch instead of trying to modify the original implementation which was broken in several ways. I have tested this version in the branch you listed for your project and it is matching the expected result you outlined.

@rez1dent3
Copy link
Author

Yes, this solved my problem. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants