Guide to Webpack 5

webpack-dev-server

clean-webpack-plugin

Deprecate plugin in favor output.clean

From webpack v5, you can remove the clean-webpack-plugin plugin and use the output.clean option in your webpack config:

js
1 output: {
2    filename: 'utils.min.js',
3    clean: true,
4 }

pnpm 没有 webpack 的类型声明

随便搞个 d.ts 然后加个三斜线指令,就会有提示了。

ts
1/// <reference path="/node_modules/webpack/types.d.ts"/>