Skip to content

Commit

Permalink
chore: Update tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed May 23, 2024
1 parent 1d8cc59 commit e39890b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 191 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,13 @@
"devDependencies": {
"prettier": "^3.2.5",
"typescript": "^5.4.5"
},
"overrides": {
"ws": "^8.0.0",
"glob": "^10.0.0"
},
"resolutions": {
"ws": "^8.0.0",
"glob": "^10.0.0"
}
}
1 change: 0 additions & 1 deletion packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"autoprefixer": "^10.4.19",
"bufferutil": "^4.0.8",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"clean-webpack-plugin": "^4.0.0",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "7.0.0",
"css-modules-types-loader": "^0.5.3",
Expand Down
7 changes: 1 addition & 6 deletions packages/examples/tools/bin/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { readdir } from 'fs/promises';
import resolveRules from '../lib/rules.js';
import appConfig from '../../app.config.js';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';

Expand Down Expand Up @@ -131,16 +130,13 @@ export default async mode => {
chunkFilename: `css/[${isDevelopment ? 'name' : 'contenthash'}].css`
};

const clean = {
cleanOnceBeforeBuildPatterns: [appConfig.entryHTML, appConfig.outputPath]
};

return {
mode,
name: appConfig.name,
entry: appConfig.entry,
context: appConfig.context,
output: {
clean: true,
hashFunction: 'xxhash64',
path: appConfig.outputPath,
publicPath: appConfig.publicPath,
Expand Down Expand Up @@ -186,7 +182,6 @@ export default async mode => {
plugins: [
new webpack.ProgressPlugin(progress),
new CaseSensitivePathsPlugin(),
new CleanWebpackPlugin(clean),
new webpack.DefinePlugin(env),
new MiniCssExtractPlugin(css),
new HtmlWebpackPlugin(html),
Expand Down
Loading

0 comments on commit e39890b

Please sign in to comment.