wip build nextjs 13
This commit is contained in:
@@ -12,9 +12,9 @@
|
|||||||
"@openpanel/web": "workspace:*"
|
"@openpanel/web": "workspace:*"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"next": "^14.0.0",
|
"next": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
|
||||||
"react": "^18.2.0",
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@openpanel/eslint-config": "workspace:*",
|
"@openpanel/eslint-config": "workspace:*",
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ export default defineConfig({
|
|||||||
...(config as any),
|
...(config as any),
|
||||||
entry: ['index.tsx'],
|
entry: ['index.tsx'],
|
||||||
format: ['cjs', 'esm'],
|
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');
|
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 {
|
try {
|
||||||
for (const name of sdkPackages) {
|
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(
|
const pkgJson = require(
|
||||||
workspacePath(`./packages/sdks/${name}/package.json`)
|
workspacePath(`./packages/sdks/${name}/package.json`)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user