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" } } ]