-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathreact-scripts-wrapper-paths.js
More file actions
28 lines (24 loc) · 1012 Bytes
/
react-scripts-wrapper-paths.js
File metadata and controls
28 lines (24 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const paths = require('react-scripts/config/paths')
const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath')
const { appRootPath, appPublic, appBuild, appPackage, appSrc, appDotEnv, appNodeModules } = require('./src/paths')
const { existsSync } = require('fs')
const { resolveModule } = require('./src/util')
const publicUrlOrPath = getPublicUrlOrPath(
process.env.NODE_ENV === 'development',
require(appPackage).homepage,
process.env.PUBLIC_URL
)
paths.dotenv = existsSync(appDotEnv) ? appDotEnv : paths.dotenv
paths.appPath = appRootPath + '/'
paths.appPublic = appPublic
paths.appHtml = appPublic + '/index.html'
paths.appBuild = appBuild
paths.appPackageJson = appPackage
paths.yarnLockFile = appRootPath + '/yarn.lock'
paths.appSrc = appSrc
paths.appIndexJs = resolveModule(appSrc + '/index')
paths.proxySetup = appSrc + '/setupProxy.js'
paths.testsSetup = appSrc + '/setupTests'
paths.appNodeModules = appNodeModules
paths.publicUrlOrPath = publicUrlOrPath
module.exports = paths