build: enable source map for all build types
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 22 Sep 2023 11:09:53 +0000 (13:09 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 22 Sep 2023 11:09:53 +0000 (13:09 +0200)
watch for any performance regression.

reference #1279

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
rollup.config.mjs
tsconfig.development.json [deleted file]
tsconfig.production.json [deleted file]
typedoc.json

index 9e8cd65bb0317152141a539de08f8d64c16a2c6c..aac1c8cdd00740db11a5c031b31b14c850049c17 100644 (file)
@@ -41,6 +41,7 @@ export default defineConfig([
         }),
         ...(!isDevelopmentBuild && {
           file: './lib/index.js',
+          sourcemap: true,
           plugins: [terser({ maxWorkers })]
         })
       },
@@ -56,6 +57,7 @@ export default defineConfig([
         }),
         ...(!isDevelopmentBuild && {
           file: './lib/index.mjs',
+          sourcemap: true,
           plugins: [terser({ maxWorkers })]
         })
       }
@@ -72,9 +74,7 @@ export default defineConfig([
     ],
     plugins: [
       typescript({
-        tsconfig: isDevelopmentBuild
-          ? './tsconfig.development.json'
-          : './tsconfig.production.json'
+        tsconfig: './tsconfig.build.json'
       }),
       del({
         targets: ['./lib/*']
diff --git a/tsconfig.development.json b/tsconfig.development.json
deleted file mode 100644 (file)
index 87915c1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "extends": "./tsconfig.json",
-  "compilerOptions": {
-    "sourceMap": true
-  },
-  "exclude": ["node_modules", "lib", "examples/typescript/**/*.ts"]
-}
diff --git a/tsconfig.production.json b/tsconfig.production.json
deleted file mode 100644 (file)
index 5eca91e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "extends": "./tsconfig.json",
-  "exclude": ["node_modules", "lib", "examples/typescript/**/*.ts"]
-}
index 75f653d8f58702d43356eacfda9a16196fb131f3..a09ea8ae3b51cec556d578e21ff890a63149bbce 100644 (file)
@@ -1,6 +1,6 @@
 {
   "$schema": "https://typedoc.org/schema.json",
-  "tsconfig": "./tsconfig.production.json",
+  "tsconfig": "./tsconfig.build.json",
   "entryPoints": ["./src"],
   "out": "./docs",
   "readme": "none",