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

terserplugin parallel = 1 #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const MomentLocalesPlugin = require("moment-locales-webpack-plugin");
const MomentTimezoneDataPlugin = require("moment-timezone-data-webpack-plugin");
const path = require("path");
const TSConfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
Copy link

Choose a reason for hiding this comment

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

You may want to add this package as a dev dependency to package.json

Copy link
Author

Choose a reason for hiding this comment

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

can I just add it manually or do I have to go through the npm install... process?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can figure out the changes needed by doing an ark init --local-only --template-ref <this branch> and the other flags ark init needs, then doing an npm install, then porting the diffs over here.


// required for react hot reloading
const ReactRefreshTypeScript = require("react-refresh-typescript");
Expand Down Expand Up @@ -126,6 +127,15 @@ module.exports = {
maxInitialRequests: 5,
},
},
// TODO: This is based on a medium circle CI instance. You can safely allocate up to
// n - 1 cores here where n is the number of cores allocated by your instance size.
Copy link
Author

Choose a reason for hiding this comment

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

I'm testing whether we can actually allocate n cores, so far seems ok but leaving this here for now.

...(process.env.CI && {
minimizer: [
new TerserPlugin({
parallel: 1
})
]
}),
plugins: [
// Extract CSS out of JS assets
new MiniCssExtractPlugin({ filename: "styles/[name].[contenthash].css" }),
Expand Down