Skip to content

feat(terser): enable cache and parallelism #497

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

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/plugins/terser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const applyOptionsCallback = require('../utils/apply-options-callback');
*/
module.exports = function(webpackConfig) {
const terserPluginOptions = {
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

};

return new TerserPlugin(
Expand Down