@qualcomm-ui/mdx-vite 3.2.0 → 3.2.2

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 +1 @@
1
- {"version":3,"file":"frontmatter-hmr-plugin.d.ts","sourceRoot":"","sources":["../../src/docs-plugin/frontmatter-hmr-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,MAAM,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,GAAE,2BAAgC,GACrC,YAAY,CAkBd"}
1
+ {"version":3,"file":"frontmatter-hmr-plugin.d.ts","sourceRoot":"","sources":["../../src/docs-plugin/frontmatter-hmr-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,MAAM,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,GAAE,2BAAgC,GACrC,YAAY,CAoBd"}
package/dist/index.js CHANGED
@@ -3814,10 +3814,12 @@ function frontmatterHmrPlugin(opts = {}) {
3814
3814
  transform(code) {
3815
3815
  if (code.includes(`export const ${exportName}`)) {
3816
3816
  code += `
3817
- ;Object.defineProperty(${exportName}, "$$typeof", {
3818
- enumerable: false,
3819
- value: Symbol.for('react.memo')
3820
- });
3817
+ if (typeof ${exportName} === 'object') {
3818
+ Object.defineProperty(${exportName}, "$$typeof", {
3819
+ enumerable: false,
3820
+ value: Symbol.for('react.memo')
3821
+ });
3822
+ }
3821
3823
  `;
3822
3824
  return code;
3823
3825
  }