Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
97c7131d
Commit
97c7131d
authored
6 years ago
by
Maël Nison
Committed by
Dan Abramov
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Forwards args through thread-loader (#5157)
* Forwards args through thread-loader * Comments & dev
parent
72fe2df6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/react-scripts/config/webpack.config.dev.js
+10
-0
packages/react-scripts/config/webpack.config.dev.js
packages/react-scripts/config/webpack.config.prod.js
+20
-2
packages/react-scripts/config/webpack.config.prod.js
with
30 additions
and
2 deletions
+30
-2
packages/react-scripts/config/webpack.config.dev.js
+
10
-
0
View file @
97c7131d
...
@@ -225,6 +225,11 @@ module.exports = {
...
@@ -225,6 +225,11 @@ module.exports = {
loader
:
require
.
resolve
(
'
thread-loader
'
),
loader
:
require
.
resolve
(
'
thread-loader
'
),
options
:
{
options
:
{
poolTimeout
:
Infinity
,
// keep workers alive for more effective watch mode
poolTimeout
:
Infinity
,
// keep workers alive for more effective watch mode
// Forwards the process args (such as --require) to the child
// workers. Ensures that the worker operates in the same kind
// of environment than the current one (important in case a
// preloaded script modifies the env)
workerNodeArgs
:
process
.
execArgv
,
},
},
},
},
{
{
...
@@ -284,6 +289,11 @@ module.exports = {
...
@@ -284,6 +289,11 @@ module.exports = {
loader
:
require
.
resolve
(
'
thread-loader
'
),
loader
:
require
.
resolve
(
'
thread-loader
'
),
options
:
{
options
:
{
poolTimeout
:
Infinity
,
// keep workers alive for more effective watch mode
poolTimeout
:
Infinity
,
// keep workers alive for more effective watch mode
// Forwards the process args (such as --require) to the child
// workers. Ensures that the worker operates in the same kind
// of environment than the current one (important in case a
// preloaded script modifies the env)
workerNodeArgs
:
process
.
execArgv
,
},
},
},
},
{
{
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/config/webpack.config.prod.js
+
20
-
2
View file @
97c7131d
...
@@ -277,7 +277,16 @@ module.exports = {
...
@@ -277,7 +277,16 @@ module.exports = {
use
:
[
use
:
[
// This loader parallelizes code compilation, it is optional but
// This loader parallelizes code compilation, it is optional but
// improves compile time on larger projects
// improves compile time on larger projects
require
.
resolve
(
'
thread-loader
'
),
{
loader
:
require
.
resolve
(
'
thread-loader
'
),
options
:
{
// Forwards the process args (such as --require) to the child
// workers. Ensures that the worker operates in the same kind
// of environment than the current one (important in case a
// preloaded script modifies the env)
workerNodeArgs
:
process
.
execArgv
,
},
},
{
{
// We need to use our own loader until `babel-loader` supports
// We need to use our own loader until `babel-loader` supports
// customization
// customization
...
@@ -332,7 +341,16 @@ module.exports = {
...
@@ -332,7 +341,16 @@ module.exports = {
use
:
[
use
:
[
// This loader parallelizes code compilation, it is optional but
// This loader parallelizes code compilation, it is optional but
// improves compile time on larger projects
// improves compile time on larger projects
require
.
resolve
(
'
thread-loader
'
),
{
loader
:
require
.
resolve
(
'
thread-loader
'
),
options
:
{
// Forwards the process args (such as --require) to the child
// workers. Ensures that the worker operates in the same kind
// of environment than the current one (important in case a
// preloaded script modifies the env)
workerNodeArgs
:
process
.
execArgv
,
},
},
{
{
loader
:
require
.
resolve
(
'
babel-loader
'
),
loader
:
require
.
resolve
(
'
babel-loader
'
),
options
:
{
options
:
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment