diff --git a/cli/plasmo/package.json b/cli/plasmo/package.json index c4c308ae0..6e82f9824 100644 --- a/cli/plasmo/package.json +++ b/cli/plasmo/package.json @@ -13,15 +13,16 @@ "bin/index.mjs", "dist/index.js", "dist/type.d.ts", - "templates" + "templates", + "tsconfig.json" ], "scripts": { "dev": "node index.mjs -w", "build": "node index.mjs", - "type": "tsup src/type.ts --format esm --dts-only --dts-resolve", + "type": "tsup src/type.ts --format esm --dts-only --dts-resolve --tsconfig tsconfig.build.json", "prepublishOnly": "run-p type build", "lint": "run-p lint:*", - "lint:type": "tsc --noemit", + "lint:type": "tsc --noemit -p tsconfig.build.json", "lint:code": "eslint src/**/*.ts" }, "author": "Plasmo Corp. ", diff --git a/cli/plasmo/tsconfig.build.json b/cli/plasmo/tsconfig.build.json new file mode 100644 index 000000000..06e780bb2 --- /dev/null +++ b/cli/plasmo/tsconfig.build.json @@ -0,0 +1,20 @@ +{ + "extends": "@plasmo/config/ts/framework.json", + "include": [ + "src/**/*.ts", + "templates/plasmo.d.ts", + "templates/static/**/*.ts", + "templates/static/**/*.tsx" + ], + "exclude": ["dist", "node_modules"], + "compilerOptions": { + "outDir": "dist", + "baseUrl": ".", + "lib": ["es2022", "dom"], + "jsx": "preserve", + "paths": { + "~*": ["./src/*"], + "@plasmo-static-common/*": ["./templates/static/common/*"] + } + } +} diff --git a/cli/plasmo/tsconfig.json b/cli/plasmo/tsconfig.json index 06e780bb2..08f245d34 100644 --- a/cli/plasmo/tsconfig.json +++ b/cli/plasmo/tsconfig.json @@ -1,20 +1 @@ -{ - "extends": "@plasmo/config/ts/framework.json", - "include": [ - "src/**/*.ts", - "templates/plasmo.d.ts", - "templates/static/**/*.ts", - "templates/static/**/*.tsx" - ], - "exclude": ["dist", "node_modules"], - "compilerOptions": { - "outDir": "dist", - "baseUrl": ".", - "lib": ["es2022", "dom"], - "jsx": "preserve", - "paths": { - "~*": ["./src/*"], - "@plasmo-static-common/*": ["./templates/static/common/*"] - } - } -} +{"extends": "./templates/tsconfig.base.json"}