wip build nextjs 13
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
"@openpanel/web": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"next": "^14.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
"next": "^11.1.0 || ^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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openpanel/eslint-config": "workspace:*",
|
||||
|
||||
@@ -6,4 +6,5 @@ export default defineConfig({
|
||||
...(config as any),
|
||||
entry: ['index.tsx'],
|
||||
format: ['cjs', 'esm'],
|
||||
external: ['next', 'react', 'react-dom'],
|
||||
});
|
||||
|
||||
769
pnpm-lock.yaml
generated
769
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -57,22 +57,27 @@ function main() {
|
||||
return console.error('Version is not valid');
|
||||
}
|
||||
|
||||
const properties = {
|
||||
private: false,
|
||||
version,
|
||||
type: 'module',
|
||||
main: './dist/index.js',
|
||||
module: './dist/index.mjs',
|
||||
types: './dist/index.d.ts',
|
||||
files: ['dist'],
|
||||
exports: {
|
||||
import: './dist/index.js',
|
||||
require: './dist/index.cjs',
|
||||
},
|
||||
};
|
||||
|
||||
try {
|
||||
for (const name of sdkPackages) {
|
||||
const properties = {
|
||||
private: false,
|
||||
version,
|
||||
type: 'module',
|
||||
main: './dist/index.js',
|
||||
module: './dist/index.mjs',
|
||||
types: './dist/index.d.ts',
|
||||
files: ['dist'],
|
||||
exports: {
|
||||
import: './dist/index.js',
|
||||
require: './dist/index.cjs',
|
||||
},
|
||||
};
|
||||
if (name === 'nextjs') {
|
||||
// @ts-expect-error
|
||||
delete properties.type;
|
||||
// @ts-expect-error
|
||||
delete properties.module;
|
||||
}
|
||||
const pkgJson = require(
|
||||
workspacePath(`./packages/sdks/${name}/package.json`)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user