commit b8d09c91799ba4bc6c6476269efdf4221dfc3b25
parent 4981ce2c547c3b02ef5b03fdaf61f645511194b5
Author: triesap <137732411+triesap@users.noreply.github.com>
Date: Sat, 9 Aug 2025 18:17:01 +0000
themes: update tsconfig
Diffstat:
4 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/themes/package.json b/themes/package.json
@@ -4,7 +4,7 @@
"private": true,
"license": "GPLv3",
"type": "module",
- "main": "./dist/cjs/index.cjs",
+ "main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
@@ -15,7 +15,7 @@
}
},
"scripts": {
- "build:esm": "tsc -p tsconfig.json",
+ "build:esm": "tsc -p tsconfig.esm.json",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build": "npm run clean && npm run build:esm && npm run build:cjs",
"prebuild": "npm run clean",
diff --git a/themes/tsconfig.cjs.json b/themes/tsconfig.cjs.json
@@ -1,8 +1,14 @@
{
- "extends": "@radroots/internal-tsconfig/tsconfig.cjs.json",
+ "extends": "@radroots/tsconfig/tsconfig.esm.json",
"compilerOptions": {
+ "module": "CommonJS",
+ "moduleResolution": "Node",
"rootDir": "./src",
- "outDir": "dist/cjs"
+ "outDir": "dist/cjs",
+ "declaration": false,
+ "declarationMap": false,
+ "emitDeclarationOnly": false,
+ "tsBuildInfoFile": "node_modules/.cache/tsc.utils-nostr.cjs.tsbuildinfo"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
diff --git a/themes/tsconfig.esm.json b/themes/tsconfig.esm.json
@@ -0,0 +1,13 @@
+{
+ "extends": "@radroots/tsconfig/tsconfig.esm.json",
+ "compilerOptions": {
+ "moduleResolution": "nodenext",
+ "rootDir": "./src",
+ "outDir": "dist/esm",
+ "declaration": true,
+ "declarationMap": true,
+ "declarationDir": "dist/types"
+ },
+ "include": ["src"],
+ "exclude": ["node_modules", "dist"]
+}
diff --git a/themes/tsconfig.json b/themes/tsconfig.json
@@ -1,9 +1,3 @@
{
- "extends": "@radroots/internal-tsconfig/tsconfig.esm.json",
- "compilerOptions": {
- "rootDir": "./src",
- "outDir": "dist/esm"
- },
- "include": ["src"],
- "exclude": ["node_modules", "dist"]
+ "extends": "./tsconfig.esm.json"
}