Skip to content

Commit 9b35015

Browse files
authored
Merge pull request #20822 from mvdbeek/webpack_dev_server_fix
Fix webpack dev server detection
2 parents 8b88530 + 9f0be71 commit 9b35015

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.pre-commit-config.yaml.sample

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ repos:
88
hooks:
99
- id: flake8
1010
- repo: https://github.com/pre-commit/mirrors-prettier
11-
rev: v2.7.1 # Use the sha or tag you want to point at
11+
rev: v3.1.0
1212
hooks:
13-
- id: prettier
14-
types: [file]
15-
types_or: [javascript, jsx, ts, tsx, vue]
16-
additional_dependencies:
17-
- [email protected] # Workaround. See https://github.com/pre-commit/mirrors-prettier/issues/29
13+
- id: prettier
14+
additional_dependencies:
15+
- [email protected] # SEE: https://github.com/pre-commit/pre-commit/issues/3133
1816
- repo: https://github.com/pre-commit/pre-commit-hooks
1917
rev: v4.5.0 # Use the ref you want to point at
2018
hooks:

client/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = (env = {}, argv = {}) => {
3939
// environment name based on -d, -p, webpack flag
4040
const targetEnv = process.env.NODE_ENV == "production" || argv.mode == "production" ? "production" : "development";
4141
// Detect if running under webpack-dev-server
42-
const isDevServer = argv.$0 && argv.$0.includes("webpack-dev-server");
42+
const isDevServer = Boolean(process.env.WEBPACK_SERVE);
4343

4444
let minimizations = {};
4545
if (targetEnv == "production") {

0 commit comments

Comments
 (0)