capacitor.config.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { CapacitorConfig } from '@capacitor/cli'
  2. let config: CapacitorConfig
  3. const baseConfig: CapacitorConfig = {
  4. appId: 'com.hasiwl.shorts',
  5. appName: '走马短剧',
  6. webDir: 'dist',
  7. bundledWebRuntime: true,
  8. backgroundColor: '#1C1C1C',
  9. android: {
  10. buildOptions: {
  11. keystorePath: '../zouma.jks',
  12. keystorePassword: 'zouma123',
  13. keystoreAlias: 'zouma',
  14. keystoreAliasPassword: 'zouma123',
  15. releaseType: 'APK'
  16. },
  17. minWebViewVersion: 60
  18. },
  19. ios: {
  20. allowsLinkPreview: false
  21. },
  22. plugins: {
  23. SplashScreen: {
  24. launchShowDuration: 2000,
  25. androidScaleType: 'CENTER_CROP',
  26. splashFullScreen: true,
  27. splashImmersive: true
  28. },
  29. CodePush: {
  30. IOS_DEPLOY_KEY: 'eAdEIJJkMhuRwBKVpDXvbay6Ay0yEJAbzi0Ur',
  31. ANDROID_DEPLOY_KEY: 'ZrEsHcngd89oYtHZYQxLRUSMJ8trafzoNUVDN',
  32. SERVER_URL: 'https://codepush.appcenter.ms/'
  33. }
  34. },
  35. server: {
  36. errorPath: 'error.html',
  37. cleartext: true
  38. }
  39. }
  40. config = { ...baseConfig }
  41. console.log('NODE_ENV: ', process.env.NODE_ENV)
  42. switch (process.env.NODE_ENV) {
  43. case 'dev':
  44. config.server!.url = 'http://192.168.6.215:3000/h5/'
  45. break
  46. default:
  47. break
  48. }
  49. export default config