Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4139855

Browse files
Set cwd to the workspace root for the webpack.config.js
Unknown
1 parent b6330a8 commit 4139855

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎packages/react-scripts/config/webpack.config.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ const sassModuleRegex = /\.module\.(scss|sass)$/;
6262

6363
const workspacesConfig = yarnWorkspaces.init(paths);
6464

65+
// Change directory to the workspace root, to resolve file paths in relation
66+
// to the workspace. Useful for backtracking errors, in context of the workspace root!
67+
process.chdir(workspacesConfig.root);
68+
6569
// This is the production and development configuration.
6670
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
6771
module.exports = function(webpackEnv) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /