@teambit/react 0.0.689 → 0.0.692

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/apps/web/react-app-options.ts +5 -0
  2. package/apps/web/react.app-type.ts +2 -1
  3. package/apps/web/react.application.ts +4 -2
  4. package/artifacts/env-template/public/793.js +3 -3
  5. package/artifacts/env-template/public/934.js +1 -0
  6. package/artifacts/env-template/public/assets-manifest.json +10 -10
  7. package/artifacts/env-template/public/{compositions.65c5519e98f2b0c3500c.js → compositions.5509b866f86976c8234c.js} +1 -1
  8. package/artifacts/env-template/public/compositions.html +1 -1
  9. package/artifacts/env-template/public/{overview.96cfc23aab78f4b27f2d.js → overview.43a93c2f24a229ed579c.js} +1 -1
  10. package/artifacts/env-template/public/overview.html +1 -1
  11. package/artifacts/env-template/public/preview-root.a1f71de58f10102ed2c6.js +1 -0
  12. package/artifacts/env-template/public/service-worker.js +1 -1
  13. package/artifacts/env-template/public/static/css/{793.539a9611.css → 793.253dc893.css} +1 -1
  14. package/artifacts/preview/teambit_react_react-preview.js +1 -1
  15. package/{compositions-1648178582015.js → compositions-1648437892896.js} +0 -0
  16. package/dist/apps/web/react-app-options.d.ts +4 -0
  17. package/dist/apps/web/react.app-type.js +1 -1
  18. package/dist/apps/web/react.app-type.js.map +1 -1
  19. package/dist/apps/web/react.application.d.ts +2 -1
  20. package/dist/apps/web/react.application.js +6 -3
  21. package/dist/apps/web/react.application.js.map +1 -1
  22. package/{overview-1648178582015.js → overview-1648437892896.js} +0 -0
  23. package/package-tar/teambit-react-0.0.692.tgz +0 -0
  24. package/package.json +30 -30
  25. package/{preview-1648178582015.js → preview-1648437892896.js} +2 -2
  26. package/artifacts/env-template/public/39.js +0 -1
  27. package/artifacts/env-template/public/preview-root.eab100865992091d02d0.js +0 -1
  28. package/package-tar/teambit-react-0.0.689.tgz +0 -0
@@ -51,4 +51,9 @@ export type ReactAppOptions = {
51
51
  * ranges of ports to use to run the app server.
52
52
  */
53
53
  portRange?: number[];
54
+
55
+ /**
56
+ * favicon for the app. You can pass an abs path (using require.resolve()) or a url.
57
+ */
58
+ favicon?: string;
54
59
  };
@@ -16,7 +16,8 @@ export class ReactAppType implements ApplicationType<ReactAppOptions> {
16
16
  options.bundler,
17
17
  options.devServer,
18
18
  options.webpackTransformers,
19
- options.deploy
19
+ options.deploy,
20
+ options.favicon
20
21
  );
21
22
  }
22
23
  }
@@ -19,9 +19,9 @@ export class ReactApp implements Application {
19
19
  readonly bundler?: Bundler,
20
20
  readonly devServer?: DevServer,
21
21
  readonly transformers?: WebpackConfigTransformer[],
22
- readonly deploy?: (context: ReactDeployContext) => Promise<void>
22
+ readonly deploy?: (context: ReactDeployContext) => Promise<void>,
23
+ readonly favicon?: string
23
24
  ) {}
24
-
25
25
  readonly applicationType = 'react-common-js';
26
26
  readonly dir = 'public';
27
27
  async run(context: AppContext): Promise<number> {
@@ -57,6 +57,7 @@ export class ReactApp implements Application {
57
57
  title: context.name,
58
58
  templateContent: html(context.name),
59
59
  minify: false,
60
+ favicon: this.favicon,
60
61
  // filename: ''.html`,
61
62
  },
62
63
  ];
@@ -117,6 +118,7 @@ export class ReactApp implements Application {
117
118
  rootPath: '',
118
119
  publicPath: `public/${this.name}`,
119
120
  title: this.name,
121
+ favicon: this.favicon,
120
122
  });
121
123
  }
122
124
  }