Skip to content

Commit 7d88240

Browse files
committed
test prettier
1 parent 44378ea commit 7d88240

File tree

2 files changed

+82
-87
lines changed

2 files changed

+82
-87
lines changed

config/webpack.config.js

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
const fs = require("fs");
42
const isWsl = require("is-wsl");
53
const path = require("path");
@@ -19,14 +17,14 @@ const WorkboxWebpackPlugin = require("workbox-webpack-plugin");
1917
const WatchMissingNodeModulesPlugin = require("react-dev-utils/WatchMissingNodeModulesPlugin");
2018
const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin");
2119
const getCSSModuleLocalIdent = require("react-dev-utils/getCSSModuleLocalIdent");
22-
const modules = require("./modules");
2320
const getClientEnvironment = require("./env");
2421
const ModuleNotFoundPlugin = require("react-dev-utils/ModuleNotFoundPlugin");
2522
const ForkTsCheckerWebpackPlugin = require("react-dev-utils/ForkTsCheckerWebpackPlugin");
2623
const typescriptFormatter = require("react-dev-utils/typescriptFormatter");
2724
const eslint = require("eslint");
2825

2926
const postcssNormalize = require("postcss-normalize");
27+
const modules = require("./modules");
3028
const paths = require("./paths");
3129

3230
const appPackageJson = require(paths.appPackageJson);
@@ -471,29 +469,26 @@ module.exports = function(webpackEnv) {
471469
},
472470
plugins: [
473471
// Generates an `index.html` file with the <script> injected.
474-
new HtmlWebpackPlugin(
475-
{
476-
477-
inject: true,
478-
template: paths.appHtml,
479-
...(isEnvProduction
480-
? {
481-
minify: {
482-
removeComments: true,
483-
collapseWhitespace: true,
484-
removeRedundantAttributes: true,
485-
useShortDoctype: true,
486-
removeEmptyAttributes: true,
487-
removeStyleLinkTypeAttributes: true,
488-
keepClosingSlash: true,
489-
minifyJS: true,
490-
minifyCSS: true,
491-
minifyURLs: true
492-
}
472+
new HtmlWebpackPlugin({
473+
inject: true,
474+
template: paths.appHtml,
475+
...(isEnvProduction
476+
? {
477+
minify: {
478+
removeComments: true,
479+
collapseWhitespace: true,
480+
removeRedundantAttributes: true,
481+
useShortDoctype: true,
482+
removeEmptyAttributes: true,
483+
removeStyleLinkTypeAttributes: true,
484+
keepClosingSlash: true,
485+
minifyJS: true,
486+
minifyCSS: true,
487+
minifyURLs: true
493488
}
494-
: undefined)
495-
}
496-
),
489+
}
490+
: undefined)
491+
}),
497492
// Inlines the webpack runtime script. This script is too small to warrant
498493
// a network request.
499494
isEnvProduction && shouldInlineRuntimeChunk && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
@@ -561,7 +556,7 @@ module.exports = function(webpackEnv) {
561556
clientsClaim: true,
562557
exclude: [/\.map$/, /asset-manifest\.json$/],
563558
importWorkboxFrom: "cdn",
564-
navigateFallback: `${publicUrl }/index.html`,
559+
navigateFallback: `${publicUrl}/index.html`,
565560
navigateFallbackBlacklist: [
566561
// Exclude URLs starting with /_, as they're likely an API call
567562
new RegExp("^/_"),

0 commit comments

Comments
 (0)