diff --git a/npm/webpack-dev-server/package.json b/npm/webpack-dev-server/package.json index 8cdf6519403d..35f683995012 100644 --- a/npm/webpack-dev-server/package.json +++ b/npm/webpack-dev-server/package.json @@ -12,7 +12,6 @@ "dependencies": { "@cypress/lazy-compile-webpack-plugin": "0.0.0-development", "debug": "4.3.2", - "html-webpack-plugin": "^4.0.0", "semver": "^7.3.4", "webpack-merge": "^5.4.0" }, @@ -27,6 +26,7 @@ "webpack-dev-server": "^3.11.0" }, "peerDependencies": { + "html-webpack-plugin": "^4.0.0", "webpack": ">=4", "webpack-dev-server": "^3.0.0" }, diff --git a/npm/webpack-dev-server/src/makeWebpackConfig.ts b/npm/webpack-dev-server/src/makeWebpackConfig.ts index ab09fa39664e..7526f0339863 100644 --- a/npm/webpack-dev-server/src/makeWebpackConfig.ts +++ b/npm/webpack-dev-server/src/makeWebpackConfig.ts @@ -8,7 +8,6 @@ import CypressCTOptionsPlugin, { CypressCTOptionsPluginOptions } from './plugin' const debug = debugFn('cypress:webpack-dev-server:makeWebpackConfig') const WEBPACK_MAJOR_VERSION = Number(webpack.version.split('.')[0]) -const removeList = ['HtmlWebpackPlugin', 'PreloadPlugin'] export interface UserWebpackDevServerOptions { /** @@ -65,25 +64,6 @@ export async function makeWebpackConfig (userWebpackConfig: webpack.Configuratio ], } - // certain plugins conflict with HtmlWebpackPlugin and cause - // problems for some setups. - // most of these are application optimizations that are not relevant in a - // testing environment. - // remove those plugins to ensure a smooth configuration experience. - // https://github.com/cypress-io/cypress/issues/15865 - if (userWebpackConfig?.plugins) { - userWebpackConfig.plugins = userWebpackConfig.plugins.filter((plugin) => { - if (removeList.includes(plugin.constructor.name)) { - /* eslint-disable no-console */ - console.warn(`[@cypress/webpack-dev-server]: removing ${plugin.constructor.name} from configuration.`) - - return false - } - - return true - }) - } - const mergedConfig = merge( userWebpackConfig, defaultWebpackConfig, diff --git a/yarn.lock b/yarn.lock index 2da33a15270d..e6e3b162f984 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19133,7 +19133,7 @@ html-webpack-plugin@4.0.0-beta.5: tapable "^1.1.0" util.promisify "1.0.0" -html-webpack-plugin@^4.0.0, html-webpack-plugin@^4.5.0: +html-webpack-plugin@^4.5.0: version "4.5.2" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz#76fc83fa1a0f12dd5f7da0404a54e2699666bc12" integrity sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A==