-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[chore] replaces hard-coded minify
values with vite.build.minify
#4803
[chore] replaces hard-coded minify
values with vite.build.minify
#4803
Conversation
🦋 Changeset detectedLatest commit: 300a0cb The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
c35c1b0
to
4b3115a
Compare
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.
Thanks!
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.
Explained in comment.
For server JS we are currently leaving that unminified main for easier debugging and because minification is not as necessary for server code. We might change that in the future but I don't think this PR is the right place for that. So Instead I think using the option in the clientBuild is correct, but you might also need to check the option within the build-css vite plugin. So that it's used for CSS that's built as part of the server JS code. |
Oh whoops, that's actually what I meant to do & mentioned in the initial comments @ Discord 😅. Just fixed it.
Should we just handle this for the client in this PR, and leave the server for another PR if it comes up? Since you mentioned updating this @ {clientJS:config, clientCSS:config, serverJS:static, serverCSS:static} might make more sense in the meantime than {clientJS:config, clientCSS:config, serverJS:static, serverCSS:config} |
4b3115a
to
2dcab45
Compare
@Enteleform no, for CSS we can honor the |
2dcab45
to
64e9d68
Compare
Just looked into it and I'm not completely sure what you're asking. So there's astro:rollup-plugin-build-css-minify, which I've already updated. Then in same file there's astro:rollup-plugin-build-css, but it seems like there's presently no minification being applied. Those are the only two references I've found to Are you saying that minification should be added @
I did find another point of minification @ integrations/cloudflare. Should I update that as well? |
Cloudflare is minifying the server JS so no need to update there. This looks good now! Maybe I just misunderstood before. |
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
48e94b0
to
300a0cb
Compare
Changes
minify
values withvite.build.minify
, so that users can override minification fromastro.config
.