Skip to content

Commit 5b735be

Browse files
authored
Merge pull request #17 from jmyrland/patch-1
Set cwd to the workspace root for the webpack.config.js
2 parents 0ad5cb5 + 4139855 commit 5b735be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
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)