fix(nextjs-sdk): ensure nextjs sdk runs on next 15 #81
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
// adding .js next/script import fixes an issues
|
||||
// with esm and nextjs (when using pages dir)
|
||||
import { NextResponse } from 'next/server.js';
|
||||
|
||||
export function createNextRouteHandler({
|
||||
apiUrl = 'https://api.openpanel.dev',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import Script from 'next/script';
|
||||
// adding .js next/script import fixes an issues
|
||||
// with esm and nextjs (when using pages dir)
|
||||
import Script from 'next/script.js';
|
||||
import React from 'react';
|
||||
|
||||
import type {
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
"@openpanel/web": "1.0.1-local"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"next": "^12.0.0 || ^13.0.0 || ^14.0.0",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
"next": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openpanel/tsconfig": "workspace:*",
|
||||
|
||||
@@ -149,8 +149,6 @@ const updatePackageJsonForRelease = (
|
||||
),
|
||||
};
|
||||
|
||||
if (name === '@openpanel/nextjs') delete newPkgJson.type;
|
||||
|
||||
savePackageJson(workspacePath(`${localPath}/package.json`), newPkgJson);
|
||||
packages[name]!.dependencies = newPkgJson.dependencies;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user