sparkecode-devtools 0.1.47 → 0.1.48
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/next.js +8 -8
- package/package.json +1 -1
package/next.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import Script from 'next/script';
|
|
4
|
-
import { useEffect, useMemo } from 'react';
|
|
4
|
+
import { createElement, useEffect, useMemo } from 'react';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_SCRIPT_URL = 'https://unpkg.com/sparkecode-devtools/sparkecode-select.js';
|
|
7
7
|
|
|
@@ -52,11 +52,11 @@ export function SparkeCodeSelect({
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
);
|
|
55
|
+
// Use createElement instead of JSX to avoid needing transpilation
|
|
56
|
+
// in the distributed package file (.js without JSX transform)
|
|
57
|
+
return createElement(Script, {
|
|
58
|
+
src: scriptUrl,
|
|
59
|
+
strategy: strategy,
|
|
60
|
+
onLoad: handleLoad,
|
|
61
|
+
});
|
|
62
62
|
}
|