From fde65781eb5f707f3fac2c0b37fca4e9afcffdc3 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Sat, 9 Mar 2019 12:25:22 +0200 Subject: [PATCH] Optimize build size --- tsconfig.json | 36 ++++++++++++++---------------------- webpack.config.js | 6 ++---- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index e144a67..af60699 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,16 @@ { - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", - "baseUrl": "src", - "outDir": "out/src", - "target": "es2017", - "strict": true, - "noFallthroughCasesInSwitch": true, - "pretty": true, - "stripInternal": true, - "typeRoots": [ - "node_modules/@types", - "typings/globals" - ], - "lib": [ - "es2017", - "esnext" - ] - }, - "exclude": [ - "node_modules" - ] + "compilerOptions": { + "module": "esnext", + "moduleResolution": "node", + "baseUrl": "src", + "outDir": "out/src", + "target": "es2018", + "strict": true, + "noFallthroughCasesInSwitch": true, + "pretty": true, + "stripInternal": true, + "typeRoots": ["node_modules/@types"], + "lib": ["es2018"] + }, + "exclude": ["node_modules"] } diff --git a/webpack.config.js b/webpack.config.js index 6d93dac..b102927 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,7 @@ const path = require('path'); module.exports = { - mode: 'development', + mode: 'production', entry: './src/phoenix.ts', output: { path: path.resolve(__dirname, 'out'), @@ -11,8 +11,6 @@ module.exports = { extensions: ['.ts', '.js'], }, module: { - rules: [ - { test: /\.ts$/, loader: 'ts-loader' }, - ], + rules: [{test: /\.ts$/, loader: 'ts-loader'}], }, };