Skip to content
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

feat(terser): enable cache and parallelism #497

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

Kocal
Copy link
Contributor

@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
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
Contributor 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.

None yet

3 participants