aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-06-22 13:21:15 -0400
committerAjay <[email protected]>2022-06-22 13:21:15 -0400
commit6b4da2584784645f0b723db8451e340a02cdf247 (patch)
treec8710e3dd60f0ab0c249e328b3947c2ec45d17bd
parent529db4d6ca67cecf9a76f52065ceba7fb8c5c94f (diff)
downloadSponsorBlock-6b4da2584784645f0b723db8451e340a02cdf247.tar.gz
SponsorBlock-6b4da2584784645f0b723db8451e340a02cdf247.zip
Create source maps in dev
-rw-r--r--tsconfig-production.json18
-rw-r--r--tsconfig.json4
-rw-r--r--webpack/webpack.common.js3
3 files changed, 22 insertions, 3 deletions
diff --git a/tsconfig-production.json b/tsconfig-production.json
new file mode 100644
index 00000000..a2cc4b4b
--- /dev/null
+++ b/tsconfig-production.json
@@ -0,0 +1,18 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": false,
+ "sourceMap": false,
+ "outDir": "dist/js",
+ "noEmitOnError": false,
+ "typeRoots": [ "node_modules/@types" ],
+ "resolveJsonModule": true,
+ "jsx": "react",
+ "lib": [
+ "es2019",
+ "dom",
+ "dom.iterable"
+ ]
+ }
+} \ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 55769505..a2c61955 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,14 +3,14 @@
"module": "commonjs",
"target": "es6",
"noImplicitAny": false,
- "sourceMap": false,
+ "sourceMap": true,
"outDir": "dist/js",
"noEmitOnError": false,
"typeRoots": [ "node_modules/@types" ],
"resolveJsonModule": true,
"jsx": "react",
"lib": [
- "es2019",
+ "es2019",
"dom",
"dom.iterable"
]
diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js
index 4f751af2..076f90af 100644
--- a/webpack/webpack.common.js
+++ b/webpack/webpack.common.js
@@ -53,7 +53,8 @@ export default env => ({
exclude: /node_modules/,
options: {
// disable type checker for user in fork plugin
- transpileOnly: true
+ transpileOnly: true,
+ configFile: env.mode === "production" ? "tsconfig-production.json" : "tsconfig.json"
}
}
]