Skip to content

Commit 9da73b5

Browse files
committed
Improve test project
1 parent 07a185d commit 9da73b5

File tree

6 files changed

+1606
-9339
lines changed

6 files changed

+1606
-9339
lines changed

test-project-webpack5/package-lock.json

Lines changed: 1535 additions & 5313 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-project-webpack5/package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
"prod": "rm -rf dist/ && npm run webpack -- --mode=production"
88
},
99
"devDependencies": {
10-
"@babel/core": "^7.14.6",
11-
"babel-loader": "^8.2.2",
12-
"copy-webpack-plugin": "^9.0.1",
13-
"css-loader": "^6.1.0",
14-
"html-webpack-plugin": "^5.3.2",
15-
"imagemin-webp-webpack-plugin": "^3.3.4",
16-
"mini-css-extract-plugin": "^2.1.0",
17-
"style-loader": "^3.1.0",
18-
"webpack": "^5.45.1",
19-
"webpack-cli": "^4.7.2",
20-
"webpack-dev-server": "^3.11.2",
10+
"@babel/core": "^7.18.9",
11+
"babel-loader": "^8.2.5",
12+
"copy-webpack-plugin": "^11.0.0",
13+
"css-loader": "^6.7.1",
14+
"html-webpack-plugin": "^5.5.0",
15+
"mini-css-extract-plugin": "^2.6.1",
16+
"style-loader": "^3.3.1",
17+
"webpack": "^5.74.0",
18+
"webpack-cli": "^4.10.0",
19+
"webpack-dev-server": "^3.11.3",
2120
"webpack-merge": "^5.8.0"
21+
},
22+
"dependencies": {
23+
"imagemin-webp-webpack-plugin": "file:.."
2224
}
2325
}

test-project-webpack5/webpack.config.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
1-
const fs = require('fs');
21
const HtmlWebpackPlugin = require('html-webpack-plugin');
32
const CopyWebpackPlugin = require('copy-webpack-plugin');
43
const { merge: webpackMerge } = require('webpack-merge');
54
const modeConfig = env => require(`./build-utils/webpack.${env}`)(env);
65

7-
8-
/**
9-
* If we don't copy the plugin in this project when
10-
* using it like this, we get a very strange error regarding
11-
*
12-
* > \cwebp-bin\\vendor\\cwebp.exe
13-
*
14-
* It seems it's trying to use it from the root `node_modules`
15-
* but there's no `vendor` subfolder there and it fails.
16-
*
17-
* TODO: find a proper/better solution than this 👇
18-
*/
19-
fs.copyFileSync('../plugin.js', 'plugin.js');
20-
const ImageminWebpWebpackPlugin = require('./plugin');
6+
const ImageminWebpWebpackPlugin = require('imagemin-webp-webpack-plugin');
217

228
module.exports = (env, { mode }) =>
239
webpackMerge(

0 commit comments

Comments
 (0)