Skip to content

Commit 62c1f1d

Browse files
committed
build: upgrade deps
1 parent 1b95680 commit 62c1f1d

File tree

5 files changed

+221
-182
lines changed

5 files changed

+221
-182
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
webpack.config.js
2+
server.js

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const presets = [
55
modules: false,
66
// see also zloirock/core-js https://bit.ly/2JLnrgw
77
useBuiltIns: 'usage',
8-
corejs: '3.6',
8+
corejs: '3.7',
99
// new in babel 7.9.0 https://babeljs.io/blog/2020/03/16/7.9.0
1010
bugfixes: true,
1111
},

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@sentry/browser": "^5.27.3",
3838
"chart.js": "^2.9.2",
3939
"clsx": "^1.1.0",
40-
"core-js": "^3.6.2",
40+
"core-js": "^3.7.0",
4141
"date-fns": "^2.16.0",
4242
"fontsource-open-sans": "^3.0.9",
4343
"fontsource-roboto-mono": "^3.0.3",
@@ -63,7 +63,7 @@
6363
"react-tabs": "^3.1.0",
6464
"react-tiny-fab": "^3.5.0",
6565
"react-window": "^1.8.5",
66-
"recoil": "^0.0.13",
66+
"recoil": "^0.1.2",
6767
"regenerator-runtime": "^0.13.7",
6868
"reselect": "^4.0.0",
6969
"workbox-core": "^5.1.4",
@@ -101,8 +101,8 @@
101101
"css-loader": "^5.0.1",
102102
"css-minimizer-webpack-plugin": "^1.1.5",
103103
"cssnano": "^4.1.7",
104-
"eslint": "^7.11.0",
105-
"eslint-config-airbnb-base": "^14.1.0",
104+
"eslint": "^7.13.0",
105+
"eslint-config-airbnb-base": "^14.2.1",
106106
"eslint-config-prettier": "^6.11.0",
107107
"eslint-config-react-app": "^6.0.0",
108108
"eslint-import-resolver-webpack": "^0.13.0",
@@ -115,11 +115,11 @@
115115
"eslint-plugin-simple-import-sort": "^5.0.3",
116116
"file-loader": "^6.1.1",
117117
"fork-ts-checker-notifier-webpack-plugin": "^3.0.0",
118-
"fork-ts-checker-webpack-plugin": "^5.2.0",
118+
"fork-ts-checker-webpack-plugin": "^6.0.1",
119119
"html-webpack-plugin": "^4.5.0",
120120
"husky": "^4.3.0",
121121
"lint-staged": "^10.5.1",
122-
"mini-css-extract-plugin": "^1.0.0",
122+
"mini-css-extract-plugin": "^1.3.0",
123123
"postcss": "^8.1.6",
124124
"postcss-custom-media": "^7.0.8",
125125
"postcss-extend-rule": "^3.0.0",
@@ -132,12 +132,12 @@
132132
"resize-observer-polyfill": "^1.5.1",
133133
"style-loader": "^2.0.0",
134134
"terser-webpack-plugin": "^5.0.0",
135-
"ts-loader": "^8.0.9",
135+
"ts-loader": "^8.0.10",
136136
"typescript": "4.1.0-beta",
137137
"webpack": "^5.4.0",
138-
"webpack-bundle-analyzer": "^3.9.0",
138+
"webpack-bundle-analyzer": "^4.1.0",
139139
"webpack-cli": "^4.2.0",
140-
"webpack-dev-middleware": "^3.7.2",
140+
"webpack-dev-middleware": "^4.0.0",
141141
"webpack-hot-middleware": "^2.22.2",
142142
"workbox-webpack-plugin": "^5.1.4"
143143
}

server.js

+4-16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const hotMiddleware = require('webpack-hot-middleware');
99

1010
const { PORT } = process.env;
1111
const port = PORT ? Number(PORT) : 3000;
12+
const publicPath = config.output.publicPath;
1213

1314
config.entry.app.import.unshift('webpack-hot-middleware/client');
1415
config.plugins.push(
@@ -17,28 +18,15 @@ config.plugins.push(
1718
);
1819

1920
const compiler = webpack(config);
20-
// webpack-dev-server config
21-
const publicPath = config.output.publicPath;
22-
const stats = {
23-
colors: true,
24-
version: false,
25-
modulesSort: 'issuer',
26-
assets: false,
27-
cached: false,
28-
cachedAssets: false,
29-
chunks: false,
30-
chunkModules: false,
31-
};
3221

33-
const options = { publicPath, stats };
34-
35-
const wdm = devMiddleware(compiler, options);
22+
const wdm = devMiddleware(compiler, { publicPath });
3623
const whm = hotMiddleware(compiler);
24+
3725
app.use(wdm);
3826
app.use(whm);
3927

4028
app.get('/_dev', (_req, res) => {
41-
const outputPath = wdm.getFilenameFromUrl(options.publicPath || '/');
29+
const outputPath = wdm.getFilenameFromUrl(publicPath || '/');
4230
const filesystem = wdm.fileSystem;
4331
const content = filesystem.readdirSync(outputPath);
4432
res.end(content.join('\n'));

0 commit comments

Comments
 (0)