-
Notifications
You must be signed in to change notification settings - Fork 10
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
Minification from Vite #82
Comments
With the way Meteor-Vite is currently set up, I'm not sure if there would be much benefit to running a Vite minification step after the Meteor build. The full Meteor-Vite build process looks something like the following:
When I first got into working on Meteor-Vite I was thinking it could act as a replacement to the Meteor build system. But it doesn't seem like Vite would be a good fit for that. Optimally, we would have Vite take care of both the client and server-side builds. But from what I can gather, Vite isn't really intended to be used as a build tool for the server. I imagine Assuming most of the build time is spent after the Meteor-Vite build step has completed, the best solutions I can think of would be to either;
One important thing to check would be the Meteor client If your Meteor client entry does have imports for application code, it's easy to end up with code that's included twice - once in your Meteor client bundle, and another in your Vite client bundle. Which will naturally slow down the build process and bloat your final production bundle. |
Hello @JorgenVatle
We recently optimized the project and wanted to get rid of unnecessary dependencies. I thought that since Vite builds the client, the
standard-minifier-js
andstandard-minifier-css
packages are no longer needed (after all, they are only needed to minify the client). But it was not so.As I understand it, the
meteor-vite
plugin does not minify third-party client code (packages folder, etc.).Moreover, as I understand it,
meteor-vite
generally ignores the minification settings, since nothing changed when these settings were changed:How much do you think it makes sense to bypass the built-in minification (that is, minify the client code after the meteor build stage)? Will this give any advantage in build speed? or will the benefit be minimal due to the complexity of the assembly process and the structure of the assembled meteor code?
The text was updated successfully, but these errors were encountered: