Skip to content

Commit 9f75d1e

Browse files
committed
Updating start-ssr command to work with updated functions
1 parent 9168ac5 commit 9f75d1e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

packages/react-scripts/scripts/start-ssr.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,21 @@ const config = configFactory('development');
4444
const appName = require(paths.appPackageJson).name;
4545
const useYarn = fs.existsSync(paths.yarnLockFile);
4646

47-
const compiler = createCompiler(webpack, config, appName, undefined, useYarn);
47+
const useTypeScript = fs.existsSync(paths.appTsConfig);
48+
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true';
49+
50+
const createCompilerOpts = {
51+
appName,
52+
config,
53+
devSocket: undefined,
54+
urls: undefined,
55+
useYarn,
56+
useTypeScript,
57+
tscCompileOnError,
58+
webpack,
59+
};
60+
61+
const compiler = createCompiler(createCompilerOpts);
4862
statusFile.init(compiler, paths.appBuildSsr);
4963

5064
compiler.watch(

0 commit comments

Comments
 (0)