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 b6330a8

Browse files
authored
Update react-scripts package name. (#14)
Update react-scripts package name.
2 parents a4d9ee5 + f63f817 commit b6330a8

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

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

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ module.exports = function(webpackEnv) {
6868
const isEnvDevelopment = webpackEnv === 'development';
6969
const isEnvProduction = webpackEnv === 'production';
7070

71+
const workspacesMainFields = [
72+
workspacesConfig.packageEntry,
73+
'browser',
74+
'module',
75+
'main',
76+
];
77+
78+
const mainFields =
79+
isEnvDevelopment && workspacesConfig.development
80+
? workspacesMainFields
81+
: isEnvProduction && workspacesConfig.production
82+
? workspacesMainFields
83+
: undefined;
84+
85+
const includePaths =
86+
isEnvDevelopment && workspacesConfig.development
87+
? [paths.appSrc, ...workspacesConfig.paths]
88+
: isEnvProduction && workspacesConfig.production
89+
? [paths.appSrc, ...workspacesConfig.paths]
90+
: paths.appSrc;
91+
7192
// Variable used for enabling profiling in Production
7293
// passed into alias object. Uses a flag if passed into the build command
7394
const isEnvProductionProfile =
@@ -404,12 +425,6 @@ module.exports = function(webpackEnv) {
404425
},
405426
],
406427
include: includePaths,
407-
// Don't lint typescript files outside the main package because it has problems with some syntax rules, e.g. abstract
408-
exclude: useTypeScript
409-
? file =>
410-
/\.tsx?/.test(path.extname(file)) &&
411-
!file.startsWith(paths.appSrc)
412-
: undefined,
413428
},
414429
{
415430
// "oneOf" will traverse all following loaders until one will

‎packages/react-scripts/config/yarn-workspaces.js‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ const loadAppSettings = appPackageJson => {
101101
const dependencies = getDeep(appPackageObj, ['dependencies']);
102102
const devDependencies = getDeep(appPackageObj, ['devDependencies']);
103103

104-
if (!dependencies && !devDependencies) return result;
104+
if (!dependencies && !devDependencies) {
105+
return result;
106+
}
105107

106108
if (dependencies) {
107109
result.dependencies = Object.assign(result.dependencies, dependencies);
@@ -115,11 +117,15 @@ const loadAppSettings = appPackageJson => {
115117
}
116118

117119
const reactScripts = getDeep(appPackageObj, ['react-scripts']);
118-
if (!reactScripts) return result;
120+
if (!reactScripts) {
121+
return result;
122+
}
119123

120124
const workspaces = getDeep(reactScripts, ['workspaces']);
121125
result.workspaces = workspaces;
122-
if (!workspaces) return result;
126+
if (!workspaces) {
127+
return result;
128+
}
123129

124130
return workspaces;
125131
};

‎packages/react-scripts/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@react-workspaces/react-scripts",
3-
"version": "3.0.1-alpha-07",
4-
"description": "React + Yarn Workspaces Configuration and scripts for Create React App.",
3+
"version": "3.3.0-alpha-08",
4+
"description": "Configuration and scripts for Create React App.",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/react-workspaces/create-react-app.git",

0 commit comments

Comments
(0)

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