@wix/zero-config-implementation 1.14.0 → 1.16.0

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.
package/README.md CHANGED
@@ -19,13 +19,13 @@ import { extractComponentManifest } from '@wix/zero-config'
19
19
 
20
20
  const result = await extractComponentManifest(
21
21
  './src/MyComponent.tsx',
22
- (name) => require(`./src/${name}`).default,
22
+ './dist/index.js', // path to the compiled JS entry of the component's package
23
23
  )
24
24
 
25
25
  result.match(
26
26
  (manifest) => {
27
- console.log(manifest.components)
28
- console.log(manifest.errors)
27
+ console.log(manifest.component) // EditorReactComponent
28
+ console.log(manifest.errors) // non-fatal ExtractionError[]
29
29
  },
30
30
  (err) => console.error(err),
31
31
  )
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export interface ExtractionError {
13
13
  componentName: string;
14
14
  phase: 'render' | 'coupling' | 'css' | 'loader' | 'conversion';
15
15
  error: string;
16
+ stack?: string;
16
17
  }
17
18
  /**
18
19
  * Extract component manifest from a TypeScript source file.