2023-06-25 08:03:24 +08:00
|
|
|
This configuration will enable the summary output for the stats report.
|
|
|
|
|
|
|
|
|
|
You see that everything is working nicely together.
|
|
|
|
|
|
|
|
|
|
# example.js
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
console.log("Hello World!");
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# webpack.config.js
|
|
|
|
|
|
|
|
|
|
```javascript
|
2025-07-08 20:46:25 +08:00
|
|
|
"use strict";
|
|
|
|
|
|
2023-06-25 08:03:24 +08:00
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
output: {
|
|
|
|
|
path: path.join(__dirname, "dist"),
|
|
|
|
|
filename: "output.js"
|
|
|
|
|
},
|
|
|
|
|
stats: "summary"
|
|
|
|
|
};
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# dist/output.js
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
|
/******/ (() => { // webpackBootstrap
|
|
|
|
|
/*!********************!*\
|
|
|
|
|
!*** ./example.js ***!
|
|
|
|
|
\********************/
|
|
|
|
|
/*! unknown exports (runtime-defined) */
|
|
|
|
|
/*! runtime requirements: */
|
|
|
|
|
console.log("Hello World!");
|
|
|
|
|
|
|
|
|
|
/******/ })()
|
|
|
|
|
;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Info
|
|
|
|
|
|
|
|
|
|
## Production mode
|
|
|
|
|
|
|
|
|
|
```
|
2025-04-29 02:11:48 +08:00
|
|
|
webpack X.X.X compiled successfully
|
2023-06-25 08:03:24 +08:00
|
|
|
```
|