From 71f3a1ea2d3d648db9f628bb1deddc41263ab438 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 20 May 2019 20:44:18 +0900 Subject: [PATCH] Configure webpack and tsconfig --- package.json | 2 +- tsconfig.json | 1 - webpack.config.js | 16 ++-------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index ac6fa75..d12779d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "NODE_ENV=production webpack --mode production --progress --display-error-details", "package": "npm run build && script/package", "lint": "eslint --ext .js,.jsx,.ts,.tsx src", - "type-checks": "tsc", + "type-checks": "tsc --noEmit", "test": "karma start", "test:e2e": "mocha --timeout 8000 e2e" }, diff --git a/tsconfig.json b/tsconfig.json index 2f26430..9f90223 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,6 @@ "lib": ["es6", "dom", "es2017"], "allowJs": true, "checkJs": true, - "noEmit": true, "jsx": "react", "sourceMap": true, "outDir": "./build", diff --git a/webpack.config.js b/webpack.config.js index 540418d..cb56835 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,21 +20,9 @@ config = { module: { rules: [ { - test: [ /\.js$/, /\.jsx$/, /\.ts$/, /\.tsx$/], + test: [ /\.ts$/, /\.tsx$/], exclude: /node_modules/, - loader: 'babel-loader', - options: { - presets: [ - { - plugins: [ - ["@babel/plugin-proposal-decorators", { "legacy": true }], - '@babel/plugin-proposal-class-properties' - ] - }, - '@babel/react', - '@babel/preset-typescript' - ] - }, + loader: 'ts-loader' }, { test: /\.css$/,