@teambit/react 0.0.1150 → 0.0.1153

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.
@@ -1,19 +1,23 @@
1
1
  import { BundlerResult } from '@teambit/bundler';
2
2
  import { ReactAppBuildResult } from './react-build-result';
3
3
 
4
- type resultsOptions = {
4
+ type ResultsOptions = {
5
5
  publicDir: string;
6
6
  ssrPublicDir?: string;
7
7
  };
8
8
  export async function computeResults(
9
9
  results: BundlerResult[],
10
- { publicDir, ssrPublicDir }: resultsOptions
10
+ { publicDir, ssrPublicDir }: ResultsOptions
11
11
  ): Promise<ReactAppBuildResult> {
12
12
  const result = results[0];
13
13
 
14
14
  return {
15
- publicDir,
16
- ssrPublicDir,
15
+ publicDir, // TODO: remove this later. it's for backward compatibility. use "metadata.publicDir" instead.
16
+ ssrPublicDir, // TODO: remove this later. it's for backward compatibility. use "metadata.ssrPublicDir" instead.
17
+ metadata: {
18
+ publicDir,
19
+ ssrPublicDir,
20
+ },
17
21
  errors: result.errors,
18
22
  warnings: result.warnings,
19
23
  };