From 2c7e240474d20f5d13826393dac0ede2f20fccc8 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Wed, 22 Jan 2020 13:39:57 +0530 Subject: [PATCH] webpack config type improvements --- webpack.config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webpack.config.ts b/webpack.config.ts index 39a25607..0d75fa99 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -6,7 +6,7 @@ import webpack from 'webpack'; const nodeEnv = process.env.NODE_ENV || 'development'; const isProd = nodeEnv === 'production'; -module.exports = [ +const config: webpack.Configuration[] = [ { mode: 'none', name: 'hyper-app', @@ -113,7 +113,7 @@ module.exports = [ resolve: { extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'] }, - devtool: isProd ? 'none' : 'cheap-module-source-map', + devtool: isProd ? false : 'cheap-module-source-map', entry: './cli/index.ts', output: { path: path.join(__dirname, 'bin'), @@ -147,3 +147,5 @@ module.exports = [ target: 'node' } ]; + +export default config;