sdk(astro,nextjs): add astro sdk and ensure window.op always first on nextjs
This commit is contained in:
@@ -71,6 +71,7 @@ export function OpenPanelComponent({
|
||||
<>
|
||||
<Script src={cdnUrl ?? CDN_URL} async defer />
|
||||
<Script
|
||||
strategy="beforeInteractive"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `window.op = window.op || function(...args) {(window.op.q = window.op.q || []).push(args)};
|
||||
${methods
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openpanel/nextjs",
|
||||
"version": "1.0.7-local",
|
||||
"version": "1.0.8-local",
|
||||
"module": "index.ts",
|
||||
"scripts": {
|
||||
"build": "rm -rf dist && tsup",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
export default defineConfig({
|
||||
format: ['cjs', 'esm'],
|
||||
entry: ['index.tsx', 'server.ts'],
|
||||
external: ['react', 'next'],
|
||||
dts: true,
|
||||
|
||||
Reference in New Issue
Block a user