Skip to content

Conversation

@Kocal
Copy link
Member

@Kocal Kocal commented Jan 18, 2019

Recently Laravel Mix have sped up build time by configuring Terser plugin (laravel-mix/laravel-mix#1925).

I though cache and parallelism options was already set on encore, but nope.

Here a comparaison, before:
capture d ecran de 2019-01-18 06-49-45

and after:
capture d ecran de 2019-01-18 06-51-05

From 16-18 seconds to 14-8 seconds on my machine.
And even if my project does not have a tons of JavaScript, the building time have been reduced.

@Lyrkan Lyrkan merged commit 801fc91 into symfony:master Jan 29, 2019
@Lyrkan
Copy link
Collaborator

Lyrkan commented Jan 29, 2019

Thanks @Kocal!

@Kocal Kocal deleted the feat/faster-terser branch January 29, 2019 17:01
@Lyrkan Lyrkan mentioned this pull request Feb 6, 2019
sourceMap: webpackConfig.useSourceMaps
sourceMap: webpackConfig.useSourceMaps,
cache: true,
parallel: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it normal to end the last line with a comma?

Copy link
Member Author

@Kocal Kocal Mar 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is allowed in JavaScript (like in TypeScript, Python, PHP...).

However I'm not sure there is a specifing style/linting rule for this on Encore.

See https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Virgules_finales for JavaScript

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

Successfully merging this pull request may close these issues.

3 participants