[SOLVED] The updated build system sucks

I know this is a rant, but it really drives me crazy.

I just wanted to upgrade a Meteor 1.6 app to 1.10.1. Not only did this endeavour take me a whole night to accomplish - as it required a whole bunch of work-arounds for breaking changes (some documented, some not) - the app I finally ended up with is barely usable.

The initial build time after doing a meteor reset on Meteor 1.6 was 1:05 minutes. On Meteor 1.10.1, this increased to 4:50 minutes. Most of that time is being spent transpiling the application 3 times, for web.browser, web.browser.legacy and web.cordova. Each of these runs takes way longer than the whole transpilation took in Meteor 1.6. Plus, for each target platform, all of my SCSS files seem to be transpiled again, which also takes ages.

If I run the app in the browser afterwards, the Chrome inspector is behaving very weirdly. It is not really possible to select an element, because each mouse action takes seconds to perform. I have yet to find out what is causing this weird phenomenon. If I revert my app back to 1.6, everything works as expected.

I can’t help, but this is not a good developer experience at all and makes me wonder if Meteor ever gets tested against “real world applications”, especially if they are using Cordova and SCSS? This is about the 4th time now I am spending hours and hours to workaround weird upgrading effects.



I thought the exclude flag was added to resolve this issue during development, have you tried using it?

The 3 compilations is to allow producing optimized build (modern JS syntax) for modern browsers and revert to legacy when an older browser is encounter. I think eventually legacy browser support will be dropped by default.

Yes, I know. But why is a special flag required in the first place if the default now increases build times 5x? As a side-note, I am currently trying to run a minifying build, to have a look at the bundle sizes. It’s still building after more approx. 10 minutes, counting.


Yeah, the bundle size minification also take a lot of time for me.

I hear you, I surely agree that no developer wants to see a regress in the build or refresh times.

It’s not only the regression. It’s the sheer amount of regression. Even if I exclude the legacy arch from the build, it still takes way longer than before (1:05 => 2:35). And I have no clue why including the legacy built doubles this time to nearly 5 minutes.

Funny side-note: The problem with the Chrome inspector goes away if I execute the minified version. Still have no clue what is causing it. Also noticed that my Fontawesome fonts are not working in dev mode, while they are working fine in minified mode. Other browsers do not show this behaviour.

I think something is off, from my testing it before it didn’t regress by that much and and in fact refresh times got faster. Is this the refresh time or the initial booting time (i.e. when starting the Meteor server?)

It’s the rebooting time after a meteor reset.

Ah yes, I think those got slower…I’ll check the numbers again, I had them written down, but what about the refresh time? did you’ve a change to explore those?

Here are the numbers I had back when I was testing 1.8.2 betas, mind you they’ve improved by now, also this is without the exclude flags and mind you this is a very big project (with many packages etc.).

Version After Reset (ms) Without Reset (ms)
1.8.1 106,268 (~1.7 minutes) 33,166 ms
1.8.2 - beta-8 693,159 (~11 minutes) 106,268 ms (~ 1 min)
1.8.2 - beta-15 114,399 ms (~ 1.9 minutes) 43,967 ms

I encourage folks to try the new betas/release candidates as soon as possible to make sure any issues get addressed.

Update on this: Firefox shows it as well.

I think I now found the cause for the weird browser behaviours: most of my CSS classes have been included about a 100 times (!). This might be related to a change I had to apply to make CSS imports work again. Will further investigate.

1 Like

Ok. Found out that all of the problems (including the huge build times) were actually caused by inadvertently including bootstrap SCSS files multiple times. Sorry for bothering :flushed:


Good to hear. But why did this problem become apparent with update? Did you add the imports during the update process?

@waldgeist Maybe we should review what we have in place for the release process and see if we could improve it in terms of testing. I think Tiny may want to prioritize adding a QA Lead to the team (as a full time position) as Meteor’s reputation as being a stable solution is in their interest

1 Like

This was a manual change I had to make due to now incompatible packages / breaking changes.

Previously, I was using {reywood:bootstrap3}. But this package references fourseven:scss@3.4.3, which cannot be used with Meteor 1.10 anymore. I had filed an issue for this back in 2017, but the package doesn’t seem to be maintained anymore. So, I dropped it and switched to npm’s Bootstrap 4.

Upgrading fourseven:scss also forced me to re-work the way my app imports the bootstrap code (as nearly on every Meteor upgrade so far). Changes in the build system make it impossible to reference SCSS files from node_modules, so you have to switch to a symbolic link approach.

While doing so, I inadvertently included the whole Bootstrap SCSS package in a global file that is referenced by nearly all of my custom packages (I intended to only include the variables file). This caused Meteor to import the whole SCSS code multiple times.

I think this happened when I was workarounding yet another issue, which occurs if multiple SCSS files contain an import with the same file name, e.g. @import "variables";. Although the files might be in different folders, Meteor always imports the file it sees first, which breaks subsequent imports. You have to switch the imports to @import "./variables" to workaround this, which I knew from previous app upgrades. Using SCSS in Meteor is really a mess.


More than happy to help with that!

Oooh I’ve done this before!, but with stylus, so it’s a common problem with the build plugins.

This definitely still works, I’ve currently got a scss file importing from bootstrap and font-awesome with imports like this:

@import '{}/node_modules/bootstrap/scss/bootstrap';

@import "{}/node_modules/font-awesome/scss/variables";
@import "{}/node_modules/font-awesome/scss/mixins";
@import "{}/node_modules/font-awesome/scss/path";
@import "{}/node_modules/font-awesome/scss/core";
@import "{}/node_modules/font-awesome/scss/larger";
@import "{}/node_modules/font-awesome/scss/fixed-width";
@import "{}/node_modules/font-awesome/scss/list";
@import "{}/node_modules/font-awesome/scss/bordered-pulled";
@import "{}/node_modules/font-awesome/scss/animated";
@import "{}/node_modules/font-awesome/scss/rotated-flipped";
@import "{}/node_modules/font-awesome/scss/stacked";
@import "{}/node_modules/font-awesome/scss/icons";
@import "{}/node_modules/font-awesome/scss/screen-reader";

@import '{}/node_modules/select2/src/scss/core.scss';

Which I’ve updated from 1.6 through 1.10.1

Which reminds me that font-awesome has issues with their import paths, so instead of being able to import the index, I had to enumerate the individual files

1 Like

In fact, after I upgraded from 1.8.3 to 1.10.1, the build time was reduced from 60 minutes to 6 minutes, depending on whether you have a lot of files

1 Like

So how are your build times now? better, same, worse?