diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..27722617 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["test"] +} diff --git a/webpack.config.js b/webpack.config.js index 898be3a8..b4eb86af 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,6 +12,7 @@ module.exports = (env, argv) => { const { LicenseWebpackPlugin } = require('license-webpack-plugin'); const pkg = require('./package.json'); + /** * Environment * @@ -78,6 +79,9 @@ module.exports = (env, argv) => { }, { loader: 'ts-loader', + options: { + configFile: NODE_ENV === 'production' ? 'tsconfig.build.json' : 'tsconfig.json', + }, }, ], },