From 8e928c562d05ccb4870909e041d80d767c58cc54 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Tue, 24 Aug 2021 00:16:09 +0800 Subject: [PATCH] chore: Modify the output dir. --- .gitignore | 1 + package.json | 8 ++++---- src/tsconfig.json | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3d58d4c11..ea456cb33 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # Edit at https://www.gitignore.io/?templates=node lib +cjs esm build doc diff --git a/package.json b/package.json index e49083839..66874a2c2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.18.17", "description": "Baidu Map Components for React.", "author": "kenny wong ", - "main": "lib/index.js", + "main": "cjs/index.js", "module": "esm/index.js", "scripts": { "prepare": "husky install && npm run build", @@ -11,11 +11,11 @@ "doc": "kkt build --app-src ./website && npm run map", "start": "kkt start --app-src ./website", "watch": "tsbb watch & npm run css:watch", - "build": "tsbb build", + "build": "tsbb build && npm run css:build", "test": "tsbb test", "coverage": "tsbb test --coverage", - "css:build": "compile-less -d src -o lib/esm", - "css:watch": "compile-less -d src -o lib/esm --watch", + "css:build": "compile-less -d src -o esm", + "css:watch": "compile-less -d src -o esm --watch", "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", "map": "source-map-explorer build/static/js/*.js --html build/website-result.html" }, diff --git a/src/tsconfig.json b/src/tsconfig.json index 5b2165a15..d1f9af400 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "noEmit": false, "baseUrl": ".", + "outDir": "../cjs", "jsx": "react" }, "include": ["../src"]