diff --git a/fixtures/flight/.gitignore b/fixtures/flight/.gitignore index 0852d35565e81..4add43216aee8 100644 --- a/fixtures/flight/.gitignore +++ b/fixtures/flight/.gitignore @@ -10,7 +10,6 @@ # production /build -/dist .eslintcache # misc diff --git a/fixtures/flight/config/paths.js b/fixtures/flight/config/paths.js index 1c7df49db7dbe..85eda99c87e26 100644 --- a/fixtures/flight/config/paths.js +++ b/fixtures/flight/config/paths.js @@ -56,7 +56,6 @@ module.exports = { appPath: resolveApp('.'), appBuild: resolveApp(buildPath), appPublic: resolveApp('public'), - appHtml: resolveApp('public/index.html'), appIndexJs: resolveModule(resolveApp, 'src/index'), appPackageJson: resolveApp('package.json'), appSrc: resolveApp('src'), diff --git a/fixtures/flight/config/webpack.config.js b/fixtures/flight/config/webpack.config.js index 9b4b7edb09c71..fbb7ee917c3ea 100644 --- a/fixtures/flight/config/webpack.config.js +++ b/fixtures/flight/config/webpack.config.js @@ -9,13 +9,10 @@ const {createHash} = require('crypto'); const path = require('path'); const webpack = require('webpack'); const resolve = require('resolve'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); -const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); const TerserPlugin = require('terser-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); -const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent'); const ESLintPlugin = require('eslint-webpack-plugin'); @@ -28,6 +25,7 @@ const ForkTsCheckerWebpackPlugin = ? require('react-dev-utils/ForkTsCheckerWarningWebpackPlugin') : require('react-dev-utils/ForkTsCheckerWebpackPlugin'); const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin'); +const {WebpackManifestPlugin} = require('webpack-manifest-plugin'); function createEnvironmentHash(env) { const hash = createHash('md5'); @@ -116,7 +114,7 @@ module.exports = function (webpackEnv) { const getStyleLoaders = (cssOptions, preProcessor) => { const loaders = [ isEnvDevelopment && require.resolve('style-loader'), - isEnvProduction && { + { loader: MiniCssExtractPlugin.loader, // css is located in `static/css`, use '../../' to locate index.html folder // in production `paths.publicUrlOrPath` can be a relative path @@ -578,44 +576,6 @@ module.exports = function (webpackEnv) { }, plugins: [ new webpack.HotModuleReplacementPlugin(), - // Generates an `index.html` file with the