From 4216451198abff78e41b34b31dc0629f229ec43d Mon Sep 17 00:00:00 2001 From: Dmitry Krupenya Date: Tue, 19 May 2020 18:49:59 +0300 Subject: [PATCH] chore: fixes after code review --- webapp/package.json | 1 - webapp/packages/builder/configs/rollup.config.js | 2 +- .../builder/configs/webpack-common-config.js | 14 +++----------- .../builder/configs/webpack-serve-config.js | 9 +++++++++ webapp/packages/builder/package.json | 3 --- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 5afd54f6dc..96e895b061 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -37,7 +37,6 @@ "eslint-plugin-import-helpers": "^1.0.2", "eslint-plugin-jest": "^22.21.0", "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-prettier": "^3.1.1", "eslint-plugin-react": "^7.16.0", "eslint-plugin-react-hooks": "^1.7.0", "lerna": "^3.19.0", diff --git a/webapp/packages/builder/configs/rollup.config.js b/webapp/packages/builder/configs/rollup.config.js index 1e803b70d0..88642c47c3 100644 --- a/webapp/packages/builder/configs/rollup.config.js +++ b/webapp/packages/builder/configs/rollup.config.js @@ -18,7 +18,7 @@ const includePathOptions = { }; const defaultBuilderOptions = { - babelConfig: path.join(__dirname, './babel-plugin.config.js'), + babelConfig: path.join(__dirname, 'babel-plugin.config.js'), typescriptConfig: '', // tbd } diff --git a/webapp/packages/builder/configs/webpack-common-config.js b/webapp/packages/builder/configs/webpack-common-config.js index 30a5f57355..e3774964e2 100644 --- a/webapp/packages/builder/configs/webpack-common-config.js +++ b/webapp/packages/builder/configs/webpack-common-config.js @@ -20,6 +20,8 @@ function replacementWithPluginImportCode(pluginsList) { let code = ''; const names = []; + console.info('build with plugins:'); + console.info(pluginsList); pluginsList.forEach(plugin => { const name = plugin @@ -41,7 +43,6 @@ function dirExists(path) { const stats = fs.statSync(path) return stats && stats.isDirectory() } catch (e) { - console.log(e) return false; } } @@ -90,7 +91,7 @@ module.exports = (env, argv) => { { loader: 'babel-loader', options: { - configFile: path.join(__dirname, './babel-app.config.js') + configFile: path.join(__dirname, 'babel-app.config.js') }, }, { @@ -122,15 +123,6 @@ module.exports = (env, argv) => { new webpack.DefinePlugin({ version: JSON.stringify(require(path.resolve(argv.currentDir, './package.json')).buildVersion), }), - new webpack.ProgressPlugin({ - entries: true, - modules: true, - modulesCount: 100, - profile: true, - // handler: (percentage, message, ...args) => { - // // custom logic - // } - }), new CircularDependencyPlugin({ // exclude detection of files based on a RegExp // exclude: /\.js|node_modules/, diff --git a/webapp/packages/builder/configs/webpack-serve-config.js b/webapp/packages/builder/configs/webpack-serve-config.js index 950b676d93..a068f77c0b 100644 --- a/webapp/packages/builder/configs/webpack-serve-config.js +++ b/webapp/packages/builder/configs/webpack-serve-config.js @@ -21,6 +21,15 @@ module.exports = (env, argv) => merge(commonConfig(env, argv), { }, devtool: 'cheap-module-eval-source-map', plugins: [ + new webpack.ProgressPlugin({ + entries: true, + modules: true, + modulesCount: 100, + profile: true, + // handler: (percentage, message, ...args) => { + // // custom logic + // } + }), // new webpack.HotModuleReplacementPlugin(), // enable HMR globally new webpack.NamedModulesPlugin(), // prints more readable module names in the browser console on HMR updates ], diff --git a/webapp/packages/builder/package.json b/webapp/packages/builder/package.json index 0460f4c14a..8a3a58503f 100644 --- a/webapp/packages/builder/package.json +++ b/webapp/packages/builder/package.json @@ -42,7 +42,6 @@ "css-loader": "^3.2.1", "extract-css-chunks-webpack-plugin": "^4.7.1", "file-loader": "^5.0.2", - "fork-ts-checker-webpack-plugin": "^4.0.5", "go-split": "^1.3.2", "graphql": "^14.5.8", "html-webpack-plugin": "^3.2.0", @@ -58,10 +57,8 @@ "preact": "^10.4.1", "preact-render-to-string": "^5.1.6", "preact-ssr-prepass": "^1.0.1", - "prettier": "^1.19.1", "prettier-eslint": "^9.0.0", "raw-loader": "^3.1.0", - "react": "^16.13.1", "react-dom": "^16.13.1", "react-hot-loader": "^4.12.18", "reakit": "1.0.0-beta.11",