From 4db2e90705306eaec139f8f004dc049fe6d54d21 Mon Sep 17 00:00:00 2001 From: xiaohuoni Date: Wed, 10 Apr 2024 17:20:08 +0800 Subject: [PATCH] feat: change inula main --- packages/inula/package.json | 11 +++++------ packages/inula/scripts/rollup/rollup.config.js | 8 ++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/inula/package.json b/packages/inula/package.json index 6e5e1ea7..69d9c286 100644 --- a/packages/inula/package.json +++ b/packages/inula/package.json @@ -8,7 +8,7 @@ "homepage": "", "bugs": "", "license": "MulanPSL2", - "main": "./build/index.js", + "main": "./index.js", "repository": {}, "engines": { "node": ">=0.10.0" @@ -22,14 +22,13 @@ "test": "jest --config=jest.config.js", "watch-test": "yarn test --watch --dev" }, - "files": ["build/**/*", "README.md"], - "types": "./build/@types/index.d.ts", + "types": "./@types/index.d.ts", "exports": { ".": { - "default": "./build/index.js" + "default": "./index.js" }, "./package.json":"./package.json", - "./jsx-runtime": "./build/jsx-runtime.js", - "./jsx-dev-runtime": "./build/jsx-dev-runtime.js" + "./jsx-runtime": "./jsx-runtime.js", + "./jsx-dev-runtime": "./jsx-dev-runtime.js" } } diff --git a/packages/inula/scripts/rollup/rollup.config.js b/packages/inula/scripts/rollup/rollup.config.js index 9228bb45..56d23bc6 100644 --- a/packages/inula/scripts/rollup/rollup.config.js +++ b/packages/inula/scripts/rollup/rollup.config.js @@ -101,6 +101,14 @@ function genConfig(mode) { from: path.join(libDir, '/npm/index.js'), to: path.join(outDir, 'index.js'), }, + { + from: path.join(libDir, 'package.json'), + to: path.join(outDir, 'package.json'), + }, + { + from: path.join(libDir, 'README.md'), + to: path.join(outDir, 'README.md'), + }, ]), ], };