From c7803e7c2911f63e43611290b996f526c0f8aaf2 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 19 May 2019 21:33:42 +0900 Subject: Configure @babel/plugin-proposal-decorators --- webpack.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index a845375..540418d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,7 +25,12 @@ config = { loader: 'babel-loader', options: { presets: [ - { plugins: ['@babel/plugin-proposal-class-properties'] }, + { + plugins: [ + ["@babel/plugin-proposal-decorators", { "legacy": true }], + '@babel/plugin-proposal-class-properties' + ] + }, '@babel/react', '@babel/preset-typescript' ] -- cgit v1.2.3 From 71f3a1ea2d3d648db9f628bb1deddc41263ab438 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 20 May 2019 20:44:18 +0900 Subject: Configure webpack and tsconfig --- package.json | 2 +- tsconfig.json | 1 - webpack.config.js | 16 ++-------------- 3 files changed, 3 insertions(+), 16 deletions(-) (limited to 'webpack.config.js') 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$/, -- cgit v1.2.3 From 7be8bc71784b8dedd0fee03dd72dd8936e2f3929 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 21 May 2019 21:52:03 +0900 Subject: Disable minify --- webpack.config.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index cb56835..1cd05df 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,6 +17,14 @@ config = { filename: '[name].js' }, + optimization: { + minimize: false + }, + + performance: { + hints: false + }, + module: { rules: [ { -- cgit v1.2.3