From b7afa274f2d7e1db2b31c8ed71d240a10a30baf5 Mon Sep 17 00:00:00 2001 From: schmelczerandras Date: Wed, 19 Aug 2020 08:09:12 +0200 Subject: [PATCH] Add source maps --- frontend/.eslintignore | 1 + frontend/package.json | 1 + frontend/webpack.config.js | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 frontend/.eslintignore diff --git a/frontend/.eslintignore b/frontend/.eslintignore new file mode 100644 index 0000000..2cb7d2a --- /dev/null +++ b/frontend/.eslintignore @@ -0,0 +1 @@ +**/*.js diff --git a/frontend/package.json b/frontend/package.json index 9df77ff..1836b01 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -38,6 +38,7 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-import": "^2.21.2", "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-unused-imports": "^0.1.3", "gl-matrix": "^3.3.0", "html-webpack-inline-source-plugin": "0.0.10", "html-webpack-plugin": "^3.2.0", diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index c63efba..0185788 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -7,13 +7,14 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin'); const Sass = require('sass'); -const isProduction = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV == 'production'; const isDevelopment = !isProduction; module.exports = { watchOptions: { ignored: /node_modules/, }, + devtool: 'inline-source-map', devServer: { host: '0.0.0.0', disableHostCheck: true, @@ -24,6 +25,7 @@ module.exports = { new TerserJSPlugin({ sourceMap: isDevelopment, cache: true, + test: /\.ts$/i, terserOptions: { ecma: 5, warnings: true,