@@ -15,7 +15,7 @@ const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath');
1515// Make sure any symlinks in the project folder are resolved:
1616// https://github.com/facebook/create-react-app/issues/637
1717const appDirectory = fs . realpathSync ( process . cwd ( ) ) ;
18- const resolveApp = relativePath => path . resolve ( appDirectory , relativePath ) ;
18+ const resolveApp = ( relativePath ) => path . resolve ( appDirectory , relativePath ) ;
1919
2020// We use `PUBLIC_URL` environment variable or "homepage" field to infer
2121// "public path" at which the app is served.
@@ -26,31 +26,17 @@ const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
2626const publicUrlOrPath = getPublicUrlOrPath (
2727 process . env . NODE_ENV === 'development' ,
2828 require ( resolveApp ( 'package.json' ) ) . homepage ,
29- process . env . PUBLIC_URL
29+ process . env . PUBLIC_URL ,
3030) ;
3131
3232const buildPath = process . env . BUILD_PATH || '../Assets/Resources/react' ;
3333const manifestPath = path . join ( buildPath , 'asset-manifest.json' ) ;
3434
35- const moduleFileExtensions = [
36- 'web.mjs' ,
37- 'mjs' ,
38- 'web.js' ,
39- 'js' ,
40- 'web.ts' ,
41- 'ts' ,
42- 'web.tsx' ,
43- 'tsx' ,
44- 'json' ,
45- 'web.jsx' ,
46- 'jsx' ,
47- ] ;
35+ const moduleFileExtensions = [ 'web.mjs' , 'mjs' , 'web.js' , 'js' , 'web.ts' , 'ts' , 'web.tsx' , 'tsx' , 'json' , 'web.jsx' , 'jsx' ] ;
4836
4937// Resolve file paths in the same order as webpack
5038const resolveModule = ( resolveFn , filePath ) => {
51- const extension = moduleFileExtensions . find ( extension =>
52- fs . existsSync ( resolveFn ( `${ filePath } .${ extension } ` ) )
53- ) ;
39+ const extension = moduleFileExtensions . find ( ( extension ) => fs . existsSync ( resolveFn ( `${ filePath } .${ extension } ` ) ) ) ;
5440
5541 if ( extension ) {
5642 return resolveFn ( `${ filePath } .${ extension } ` ) ;
@@ -85,7 +71,7 @@ module.exports = {
8571} ;
8672
8773// @remove -on-eject-begin
88- const resolveOwn = relativePath => path . resolve ( __dirname , '..' , relativePath ) ;
74+ const resolveOwn = ( relativePath ) => path . resolve ( __dirname , '..' , relativePath ) ;
8975
9076// config before eject: we're in ./node_modules/react-unity-scripts/config/
9177module . exports = {
@@ -119,15 +105,10 @@ module.exports = {
119105
120106const ownPackageJson = require ( '../package.json' ) ;
121107const reactScriptsPath = resolveApp ( `node_modules/${ ownPackageJson . name } ` ) ;
122- const reactScriptsLinked =
123- fs . existsSync ( reactScriptsPath ) &&
124- fs . lstatSync ( reactScriptsPath ) . isSymbolicLink ( ) ;
108+ const reactScriptsLinked = fs . existsSync ( reactScriptsPath ) && fs . lstatSync ( reactScriptsPath ) . isSymbolicLink ( ) ;
125109
126110// config before publish: we're in ./packages/react-unity-scripts/config/
127- if (
128- ! reactScriptsLinked &&
129- __dirname . indexOf ( path . join ( 'packages' , 'react-unity-scripts' , 'config' ) ) !== - 1
130- ) {
111+ if ( ! reactScriptsLinked && __dirname . indexOf ( path . join ( 'packages' , 'react-unity-scripts' , 'config' ) ) !== - 1 ) {
131112 const templatePath = '../cra-template/template' ;
132113 module . exports = {
133114 dotenv : resolveOwn ( `${ templatePath } /.env` ) ,
0 commit comments