docs: add example for stats normal output
This commit is contained in:
parent
1e18b1d1c7
commit
9c419c24ba
|
@ -0,0 +1,49 @@
|
|||
This configuration will enable the normal output for the stats report.
|
||||
|
||||
You see that everything is working nicely together.
|
||||
|
||||
# example.js
|
||||
|
||||
```javascript
|
||||
console.log("Hello World!");
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: path.join(__dirname, "dist"),
|
||||
filename: "output.js"
|
||||
},
|
||||
stats: "normal"
|
||||
};
|
||||
```
|
||||
|
||||
# dist/output.js
|
||||
|
||||
```javascript
|
||||
/******/ (() => { // webpackBootstrap
|
||||
var __webpack_exports__ = {};
|
||||
/*!********************!*\
|
||||
!*** ./example.js ***!
|
||||
\********************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: */
|
||||
console.log("Hello World!");
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 28 bytes [emitted] [minimized] (name: main)
|
||||
./example.js 29 bytes [built] [code generated]
|
||||
webpack 5.88.0 compiled successfully
|
||||
```
|
|
@ -0,0 +1,4 @@
|
|||
global.NO_REASONS = true;
|
||||
global.NO_STATS_OPTIONS = true;
|
||||
global.STATS_COLORS = true;
|
||||
require("../build-common");
|
|
@ -0,0 +1 @@
|
|||
console.log("Hello World!");
|
|
@ -0,0 +1,29 @@
|
|||
This configuration will enable the normal output for the stats report.
|
||||
|
||||
You see that everything is working nicely together.
|
||||
|
||||
# example.js
|
||||
|
||||
```javascript
|
||||
_{{example.js}}_
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
_{{webpack.config.js}}_
|
||||
```
|
||||
|
||||
# dist/output.js
|
||||
|
||||
```javascript
|
||||
_{{dist/output.js}}_
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
_{{production:stdout}}_
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: path.join(__dirname, "dist"),
|
||||
filename: "output.js"
|
||||
},
|
||||
stats: "normal"
|
||||
};
|
Loading…
Reference in New Issue