meteor / meteor-feature-requests

A tracker for Meteor issues that are requests for new functionality, not bugs.
Other
89 stars 3 forks source link

How to not build web.browser and web.browser.legacy, build only server #405

Open crapthings opened 3 years ago

crapthings commented 3 years ago

build server-only are include web.browser and web.browser.legacy

want to save some build time that build server only

schlaegerz commented 3 years ago

You can do it by using exclude-archs

meteor --exclude-archs web.browser.legacy,web.browser

hexsprite commented 3 years ago

@schlaegerz i don't think the --exclude-archs flag applies to meteor build, only meteor run

filipenevola commented 3 years ago

I believe @sebakerckhof posted something about this option when he implemented it. I don't remember what was the conclusion.

sebakerckhof commented 3 years ago

Correct. It wouldn't be too hard to also make it work for production builds, but there's some rough edges that would need to be handled. I don't recall all of it, but for example what is the behavior if someone tries to access it? Refuse the connection or show a message? Should that message be customizable and how?

However, it's not clear if crapthings talks about dev build times or production build times.

runlevelsix commented 3 years ago

Adding my +1 to this and hoping that there can be more traction on it soon. If I recall correctly, the web.browser.legacy is mostly to support IE11, which has been deprecated and is no longer supported by Microsoft. I hope it would be considered "about time" to allow preventing a legacy browser build.

In my experience, cutting out the legacy build will cut meteor build times by anywhere from 1/2 to 2/3. On a large codebase, that could be make a huge difference on a 38 minute build...

StorytellerCZ commented 3 years ago

Could this PR help with this issue: https://github.com/meteor/meteor/pull/11437

runlevelsix commented 3 years ago

Yes, I think that option would be a good alternative if it supported excluding web.browser.legacy (when not explicitly added to the --platforms list). However, the most recent commit (839a69db) doesn't seem to have that distinction.

I'm looking to exclude building for legacy browsers as a way to cut down release build times significantly when using meteor build.