fix sdk version
This commit is contained in:
parent
47042f043b
commit
ce24e8f4fb
12 changed files with 31 additions and 7 deletions
|
@ -1 +1,3 @@
|
|||
export * from '@aptabase/react';
|
||||
|
||||
globalThis.__APTABASE_SDK_VERSION__ = `aptabase-nextjs@${process.env.PKG_VERSION}`;
|
||||
|
|
1
packages/nextjs/src/global.d.ts
vendored
Normal file
1
packages/nextjs/src/global.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
declare var __APTABASE_SDK_VERSION__: string;
|
|
@ -3,6 +3,8 @@ import { type AptabaseOptions } from '@aptabase/node';
|
|||
import { type NextIncomingMessage } from 'next/dist/server/request-meta';
|
||||
import { headers } from 'next/headers';
|
||||
|
||||
globalThis.__APTABASE_SDK_VERSION__ = `aptabase-nextjs@${process.env.PKG_VERSION}`;
|
||||
|
||||
export function init(appKey: string, options?: AptabaseOptions): void {
|
||||
node.init(appKey, options);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { defineConfig } from 'tsup';
|
||||
const { version } = require('./package.json');
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/index.ts', 'src/server.ts', 'src/client.tsx'],
|
||||
|
@ -8,4 +9,7 @@ export default defineConfig({
|
|||
minify: true,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
env: {
|
||||
PKG_VERSION: version,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue