Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "add react-refresh hot reloading" #5640

Merged
merged 1 commit into from Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 3 additions & 10 deletions frontend/package.json
Expand Up @@ -77,13 +77,13 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^5.9.0",
"@patternfly/patternfly": "2.71.5",
"@patternfly/react-catalog-view-extension": "1.4.58",
"@patternfly/react-charts": "5.3.19",
"@patternfly/react-core": "3.153.13",
"@patternfly/react-table": "2.28.39",
"@patternfly/react-tokens": "2.8.13",
"@patternfly/react-topology": "2.14.58",
"@patternfly/react-virtualized-extension": "1.4.59",
"@patternfly/react-catalog-view-extension": "1.4.58",
"abort-controller": "3.0.0",
"classnames": "2.x",
"core-js": "2.x",
Expand Down Expand Up @@ -142,12 +142,7 @@
"yaml-language-server": "0.5.4",
"yup": "^0.27.0"
},
"peerDependencies": {
"type-fest": "0.13.1"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@pmmmwh/react-refresh-webpack-plugin": "^0.3.2",
"@types/classnames": "^2.2.7",
"@types/enzyme": "3.10.x",
"@types/glob": "7.x",
Expand All @@ -167,7 +162,6 @@
"@types/react-transition-group": "2.x",
"@types/react-virtualized": "9.x",
"@types/webpack": "4.x",
"babel-loader": "^8.1.0",
"bootstrap-sass": "^3.3.7",
"browser-env": "3.x",
"cache-loader": "1.x",
Expand Down Expand Up @@ -200,7 +194,6 @@
"protractor": "5.4.x",
"protractor-fail-fast": "3.x",
"protractor-jasmine2-screenshot-reporter": "0.5.x",
"react-refresh": "^0.8.3",
"read-pkg": "5.x",
"redux-mock-store": "^1.5.3",
"resolve-url-loader": "2.x",
Expand All @@ -211,10 +204,10 @@
"ts-loader": "^6.2.2",
"ts-node": "5.x",
"typescript": "3.8.3",
"webpack": "4.43.0",
"webpack": "4.40.2",
"webpack-bundle-analyzer": "^3.5.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.11.0",
"webpack-dev-server": "^3.8.1",
"webpack-virtual-modules": "^0.1.10"
},
"engines": {
Expand Down
14 changes: 1 addition & 13 deletions frontend/webpack.config.ts
Expand Up @@ -5,7 +5,6 @@ import * as HtmlWebpackPlugin from 'html-webpack-plugin';
import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import * as MiniCssExtractPlugin from 'mini-css-extract-plugin';
import * as VirtualModulesPlugin from 'webpack-virtual-modules';
import * as ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';

import { resolvePluginPackages, getActivePluginsModule } from '@console/plugin-sdk/src/codegen';
import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
Expand All @@ -24,7 +23,6 @@ const CHECK_CYCLES = process.env.CHECK_CYCLES || 'false';
/* Helpers */
const extractCSS = new MiniCssExtractPlugin({ filename: 'app-bundle.[contenthash].css' });
const overpassTest = /overpass-.*\.(woff2?|ttf|eot|otf)(\?.*$|$)/;
const isDevelopment = NODE_ENV !== 'production';

const config: Configuration = {
entry: [
Expand Down Expand Up @@ -70,16 +68,6 @@ const config: Configuration = {
workers: require('os').cpus().length - 1,
},
},
...(isDevelopment
? [
{
loader: 'babel-loader',
options: {
plugins: ['react-refresh/babel'],
},
},
]
: []),
{
loader: 'ts-loader',
options: {
Expand Down Expand Up @@ -172,7 +160,6 @@ const config: Configuration = {
}),
new webpack.IgnorePlugin(/prettier/),
extractCSS,
...(isDevelopment ? [new ReactRefreshWebpackPlugin()] : []),
],
devtool: 'cheap-module-source-map',
stats: 'minimal',
Expand All @@ -197,6 +184,7 @@ if (NODE_ENV === 'production') {
config.optimization.concatenateModules = false;
config.stats = 'normal';
}

/* Console plugin support */
config.plugins.push(
new VirtualModulesPlugin({
Expand Down