craco.config.js
image.png

devServerConfig

本地服务器配置

  1. {
  2. allowedHosts: 'all',
  3. headers: {
  4. 'Access-Control-Allow-Origin': '*',
  5. 'Access-Control-Allow-Methods': '*',
  6. 'Access-Control-Allow-Headers': '*'
  7. },
  8. compress: true,
  9. static: {
  10. directory: '/Users/lulongwen/Documents/Project/datav/skywalking/cra-skywalking/public',
  11. publicPath: ['/'],
  12. watch: {
  13. ignored: /^(?!\/Users\/lulongwen\/Documents\/Project\/datav\/skywalking\/cra\x2dskywalking\/src\/).+\/node_modules\//g
  14. }
  15. },
  16. client: {
  17. webSocketURL: { hostname: undefined, pathname: undefined, port: undefined },
  18. overlay: { errors: true, warnings: false }
  19. },
  20. devMiddleware: { publicPath: '' },
  21. https: false,
  22. host: '0.0.0.0',
  23. historyApiFallback: { disableDotRule: true, index: '/' },
  24. proxy: undefined,
  25. onBeforeSetupMiddleware: [Function: onBeforeSetupMiddleware],
  26. onAfterSetupMiddleware: [Function: onAfterSetupMiddleware]
  27. }


env 环境变量

development

paths

  1. {
  2. dotenv: '/Users/lulongwen/Documents/cra-skywalking/.env',
  3. appPath: '/Users/lulongwen/Documents/cra-skywalking',
  4. appBuild: '/Users/lulongwen/Documents/cra-skywalking/build',
  5. appPublic: '/Users/lulongwen/Documents/cra-skywalking/public',
  6. appHtml: '/Users/lulongwen/Documents/cra-skywalking/public/index.html',
  7. appIndexJs: '/Users/lulongwen/Documents/cra-skywalking/src/index.js',
  8. appPackageJson: '/Users/lulongwen/Documents/cra-skywalking/package.json',
  9. appSrc: '/Users/lulongwen/Documents/cra-skywalking/src',
  10. appTsConfig: '/Users/lulongwen/Documents/cra-skywalking/tsconfig.json',
  11. appJsConfig: '/Users/lulongwen/Documents/cra-skywalking/jsconfig.json',
  12. yarnLockFile: '/Users/lulongwen/Documents/cra-skywalking/yarn.lock',
  13. testsSetup: '/Users/lulongwen/Documents/cra-skywalking/src/setupTests.js',
  14. proxySetup: '/Users/lulongwen/Documents/cra-skywalking/src/setupProxy.js',
  15. appNodeModules: '/Users/lulongwen/Documents/cra-skywalking/node_modules',
  16. appWebpackCache: '/Users/lulongwen/Documents/cra-skywalking/node_modules/.cache',
  17. appTsBuildInfoFile: '/Users/lulongwen/Documents/cra-skywalking/node_modules/.cache/tsconfig.tsbuildinfo',
  18. swSrc: '/Users/lulongwen/Documents/cra-skywalking/src/service-worker.js',
  19. publicUrlOrPath: '/',
  20. ownPath: '/Users/lulongwen/Documents/cra-skywalking/node_modules/react-scripts',
  21. ownNodeModules: '/Users/lulongwen/Documents/cra-skywalking/node_modules/react-scripts/node_modules',
  22. appTypeDeclarations: '/Users/lulongwen/Documents/cra-skywalking/src/react-app-env.d.ts',
  23. ownTypeDeclarations: '/Users/lulongwen/Documents/cra-skywalking/node_modules/react-scripts/lib/react-app.d.ts',
  24. moduleFileExtensions: [
  25. 'web.mjs', 'mjs',
  26. 'web.js', 'js',
  27. 'web.ts', 'ts',
  28. 'web.tsx', 'tsx',
  29. 'json', 'web.jsx',
  30. 'jsx'
  31. ]
  32. }

proxy

undefined

allowedHost

本地 IP
192.168.0.6