Skip to content

Commit e95be18

Browse files
docs: update examples (#22331)
Co-authored-by: alexander-akait <[email protected]>
1 parent eb43ae5 commit e95be18

12 files changed

Lines changed: 244 additions & 246 deletions

File tree

‎examples/add-imports/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ webpack X.X.X compiled successfully
308308
## Production mode
309309

310310
```
311-
asset output.js 895 bytes [emitted] [minimized] (name: main)
311+
asset output.js 885 bytes [emitted] [minimized] (name: main)
312312
chunk (runtime: main) output.js (main) 725 bytes (javascript) 1.04 KiB (runtime) [entry] [rendered]
313313
> ./example.js main
314314
runtime modules 1.04 KiB 4 modules

‎examples/custom-javascript-parser/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ chunk (runtime: main) output.js (main) 457 bytes (javascript) 5.28 KiB (runtime)
302302
entry ./example.js main
303303
webpack X.X.X compiled successfully
304304
305-
asset output.js 11.3 KiB [compared for emit] (name: main)
306-
asset 655.output.js 761 bytes [compared for emit]
305+
asset output.js 11.3 KiB [emitted] (name: main)
306+
asset 655.output.js 761 bytes [emitted]
307307
chunk (runtime: main) 655.output.js 24 bytes [rendered]
308308
> ./async-loaded ./example.js 6:0-24
309309
./async-loaded.js 24 bytes [built] [code generated]

‎examples/html-csp/README.md‎

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ carrying a hash for each one.
104104
```html
105105
<!DOCTYPE html>
106106
<html lang="en">
107-
<head><meta http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-5NlCGoSN8ETSUabbmQKYTt1H6nvYWb5OGZJTsWS8iC8='; style-src 'self' 'sha256-vp73KxgWfPhtZ9IRKOt378FrPIkD/T6FbLXnXfaktI8=' 'sha256-+Ver9ZPpEiV0Cq4WfPc7DL+LUo1ECenMRe/8IigO+wA='; object-src 'none'; base-uri 'self'">
107+
<head><meta http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-5NlCGoSN8ETSUabbmQKYTt1H6nvYWb5OGZJTsWS8iC8='; style-src 'self' 'sha256-vp73KxgWfPhtZ9IRKOt378FrPIkD/T6FbLXnXfaktI8=' 'sha256-PeRoLnh26TSx4wkeBvm/ZhVSCqLZCkG+9GLVbJikD+I='; object-src 'none'; base-uri 'self'">
108108
<meta charset="utf-8" />
109109
<title>CSP</title>
110110

@@ -131,8 +131,7 @@ h1.ready {
131131
body {
132132
font-family: sans-serif;
133133
}
134-
135-
</style>
134+
</style>
136135
</head>
137136
<body>
138137
<h1>Content-Security-Policy</h1>
@@ -159,59 +158,59 @@ console.log("bundled + inlined script, covered by a CSP hash");
159158

160159
```
161160
asset index.html 1.59 KiB [emitted] (auxiliary name: index)
162-
asset app.js 319 bytes [emitted] (name: __html_6d047296_1)
163-
asset styles.css 157 bytes [emitted] (name: __html_6d047296_0)
161+
asset app.js 319 bytes [emitted] (name: src-index-1)
162+
asset styles.css 157 bytes [emitted] (name: src-index-0)
164163
Entrypoint index (1.59 KiB) = 1 auxiliary asset
165-
Entrypoint __html_6d047296_1 319 bytes = app.js
166-
Entrypoint __html_6d047296_0 157 bytes = styles.css
167-
chunk (runtime: __html_6d047296_0) styles.css (__html_6d047296_0) 55 bytes (css) 0 bytes (runtime) [entry] [rendered]
168-
> ./styles.css __html_6d047296_0
169-
runtime modules 0 bytes 1 module
170-
css ./src/styles.css 55 bytes [built] [code generated]
171-
[no exports]
172-
[used exports unknown]
173-
entry ./styles.css __html_6d047296_0
174-
chunk (runtime: __html_6d047296_1) app.js (__html_6d047296_1) 117 bytes [entry] [rendered]
175-
> ./app.js __html_6d047296_1
176-
./src/app.js 117 bytes [built] [code generated]
177-
[used exports unknown]
178-
entry ./app.js __html_6d047296_1
164+
Entrypoint src-index-1 319 bytes = app.js
165+
Entrypoint src-index-0 157 bytes = styles.css
179166
chunk (runtime: index) (index) 47 bytes (css-text) 549 bytes (html) [entry]
180167
> ./src/index.html index
181168
dependent modules 47 bytes [dependent] 1 module
182169
./src/index.html 549 bytes [built] [code generated]
183170
[exports: default]
184171
[used exports unknown]
185172
entry ./src/index.html index
173+
chunk (runtime: src-index-0) styles.css (src-index-0) 55 bytes (css) 0 bytes (runtime) [entry] [rendered]
174+
> ./styles.css src-index-0
175+
runtime modules 0 bytes 1 module
176+
css ./src/styles.css 55 bytes [built] [code generated]
177+
[no exports]
178+
[used exports unknown]
179+
entry ./styles.css src-index-0
180+
chunk (runtime: src-index-1) app.js (src-index-1) 117 bytes [entry] [rendered]
181+
> ./app.js src-index-1
182+
./src/app.js 117 bytes [built] [code generated]
183+
[used exports unknown]
184+
entry ./app.js src-index-1
186185
webpack X.X.X compiled successfully
187186
```
188187

189188
## Production mode
190189

191190
```
192191
asset index.html 570 bytes [emitted] [minimized] (auxiliary name: index)
193-
asset styles.css 40 bytes [emitted] [minimized] (name: __html_6d047296_0)
192+
asset styles.css 40 bytes [emitted] [minimized] (name: src-index-0)
194193
Entrypoint index (570 bytes) = 1 auxiliary asset
195-
Entrypoint __html_6d047296_1 =
196-
Entrypoint __html_6d047296_0 40 bytes = styles.css
194+
Entrypoint src-index-1 =
195+
Entrypoint src-index-0 40 bytes = styles.css
197196
chunk (runtime: index) (index) 47 bytes (css-text) 549 bytes (html) [entry]
198197
> ./src/index.html index
199198
dependent modules 47 bytes [dependent] 1 module
200199
./src/index.html 549 bytes [built] [code generated]
201200
[exports: default]
202201
[no exports used]
203202
entry ./src/index.html index
204-
chunk (runtime: __html_6d047296_0) styles.css (__html_6d047296_0) 55 bytes (css) 0 bytes (runtime) [entry] [rendered]
205-
> ./styles.css __html_6d047296_0
203+
chunk (runtime: src-index-0) styles.css (src-index-0) 55 bytes (css) 0 bytes (runtime) [entry] [rendered]
204+
> ./styles.css src-index-0
206205
runtime modules 0 bytes 1 module
207206
css ./src/styles.css 55 bytes [built] [code generated]
208207
[no exports]
209208
[no exports used]
210-
entry ./styles.css __html_6d047296_0
211-
chunk (runtime: __html_6d047296_1) (__html_6d047296_1) 117 bytes [entry] [rendered]
212-
> ./app.js __html_6d047296_1
209+
entry ./styles.css src-index-0
210+
chunk (runtime: src-index-1) (src-index-1) 117 bytes [entry] [rendered]
211+
> ./app.js src-index-1
213212
./src/app.js 117 bytes [built] [code generated]
214213
[no exports used]
215-
entry ./app.js __html_6d047296_1
214+
entry ./app.js src-index-1
216215
webpack X.X.X compiled successfully
217216
```

‎examples/html-module-nomodule/README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,20 @@ The emitted page, with the modern `type="module"` entry tag plus the injected
155155
```
156156
modern:
157157
asset index.html 745 bytes [emitted] (auxiliary name: page)
158-
asset app.modern.js 449 bytes [emitted] [javascript module] (name: __html_6d047296_0)
158+
asset app.modern.js 449 bytes [emitted] [javascript module] (name: src-index-0)
159159
Entrypoint page (745 bytes) = 1 auxiliary asset
160-
Entrypoint __html_6d047296_0 449 bytes = app.modern.js
161-
chunk (runtime: __html_6d047296_0) app.modern.js (__html_6d047296_0) 300 bytes [entry] [rendered]
162-
> ./app.js __html_6d047296_0
163-
./src/app.js 300 bytes [built] [code generated]
164-
[used exports unknown]
165-
entry ./app.js __html_6d047296_0
160+
Entrypoint src-index-0 449 bytes = app.modern.js
166161
chunk (runtime: page) (page) 359 bytes [entry]
167162
> ./src/index.html page
168163
./src/index.html 359 bytes [built] [code generated]
169164
[exports: default]
170165
[used exports unknown]
171166
entry ./src/index.html page
167+
chunk (runtime: src-index-0) app.modern.js (src-index-0) 300 bytes [entry] [rendered]
168+
> ./app.js src-index-0
169+
./src/app.js 300 bytes [built] [code generated]
170+
[used exports unknown]
171+
entry ./app.js src-index-0
172172
modern (webpack X.X.X) compiled successfully
173173

174174
legacy:
@@ -186,14 +186,14 @@ legacy:
186186
```
187187
modern:
188188
asset index.html 584 bytes [emitted] [minimized] (auxiliary name: page)
189-
asset app.modern.js 90 bytes [emitted] [javascript module] [minimized] (name: __html_6d047296_0)
189+
asset app.modern.js 90 bytes [emitted] [javascript module] [minimized] (name: src-index-0)
190190
Entrypoint page (584 bytes) = 1 auxiliary asset
191-
Entrypoint __html_6d047296_0 90 bytes = app.modern.js
192-
chunk (runtime: __html_6d047296_0) app.modern.js (__html_6d047296_0) 300 bytes [entry] [rendered]
193-
> ./app.js __html_6d047296_0
191+
Entrypoint src-index-0 90 bytes = app.modern.js
192+
chunk (runtime: src-index-0) app.modern.js (src-index-0) 300 bytes [entry] [rendered]
193+
> ./app.js src-index-0
194194
./src/app.js 300 bytes [built] [code generated]
195195
[no exports used]
196-
entry ./app.js __html_6d047296_0
196+
entry ./app.js src-index-0
197197
chunk (runtime: page) (page) 359 bytes [entry]
198198
> ./src/index.html page
199199
./src/index.html 359 bytes [built] [code generated]

‎examples/html-template/README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,11 @@ Custom Eta tags (`{{= }}`) and unescaped output, selected by the rule.
218218
assets by chunk 14.9 KiB (auxiliary name: index)
219219
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: src/logo.png] (auxiliary name: index)
220220
asset index.html 393 bytes [emitted] (auxiliary name: index)
221-
asset app.js 445 bytes [emitted] (name: __html_6d047296_0)
221+
asset app.js 445 bytes [emitted] (name: src-index-0)
222222
asset special.html 218 bytes [emitted] (auxiliary name: special)
223223
Entrypoint index (14.9 KiB) = 2 auxiliary assets
224224
Entrypoint special (218 bytes) = 1 auxiliary asset
225-
Entrypoint __html_6d047296_0 445 bytes = app.js
226-
chunk (runtime: __html_6d047296_0) app.js (__html_6d047296_0) 243 bytes [entry] [rendered]
227-
> ./app.js __html_6d047296_0
228-
./src/app.js 243 bytes [built] [code generated]
229-
[used exports unknown]
230-
entry ./app.js __html_6d047296_0
225+
Entrypoint src-index-0 445 bytes = app.js
231226
chunk (runtime: index) (index) 14.6 KiB (asset) 42 bytes (asset-url) 381 bytes (html) [entry]
232227
> ./src/index.html index
233228
dependent modules 14.6 KiB (asset) 42 bytes (asset-url) [dependent] 1 module
@@ -241,6 +236,11 @@ chunk (runtime: special) (special) 218 bytes [entry]
241236
[exports: default]
242237
[used exports unknown]
243238
entry ./src/special.html special
239+
chunk (runtime: src-index-0) app.js (src-index-0) 243 bytes [entry] [rendered]
240+
> ./app.js src-index-0
241+
./src/app.js 243 bytes [built] [code generated]
242+
[used exports unknown]
243+
entry ./app.js src-index-0
244244
webpack X.X.X compiled successfully
245245
```
246246

@@ -251,22 +251,22 @@ assets by chunk 14.9 KiB (auxiliary name: index)
251251
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: src/logo.png] (auxiliary name: index)
252252
asset index.html 364 bytes [emitted] [minimized] (auxiliary name: index)
253253
asset special.html 199 bytes [emitted] [minimized] (auxiliary name: special)
254-
asset app.js 46 bytes [emitted] [minimized] (name: __html_6d047296_0)
254+
asset app.js 46 bytes [emitted] [minimized] (name: src-index-0)
255255
Entrypoint index (14.9 KiB) = 2 auxiliary assets
256256
Entrypoint special (199 bytes) = 1 auxiliary asset
257-
Entrypoint __html_6d047296_0 46 bytes = app.js
257+
Entrypoint src-index-0 46 bytes = app.js
258258
chunk (runtime: index) (index) 14.6 KiB (asset) 42 bytes (asset-url) 381 bytes (html) [entry]
259259
> ./src/index.html index
260260
dependent modules 14.6 KiB (asset) 42 bytes (asset-url) [dependent] 1 module
261261
./src/index.html 381 bytes [built] [code generated]
262262
[exports: default]
263263
[no exports used]
264264
entry ./src/index.html index
265-
chunk (runtime: __html_6d047296_0) app.js (__html_6d047296_0) 243 bytes [entry] [rendered]
266-
> ./app.js __html_6d047296_0
265+
chunk (runtime: src-index-0) app.js (src-index-0) 243 bytes [entry] [rendered]
266+
> ./app.js src-index-0
267267
./src/app.js 243 bytes [built] [code generated]
268268
[no exports used]
269-
entry ./app.js __html_6d047296_0
269+
entry ./app.js src-index-0
270270
chunk (runtime: special) (special) 218 bytes [entry]
271271
> ./src/special.html special
272272
./src/special.html 218 bytes [built] [code generated]

‎examples/html-transform-tags/README.md‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -151,58 +151,58 @@ the script moved to the end of `<body>` as `<script defer>`.
151151

152152
```
153153
asset index.html 545 bytes [emitted] (auxiliary name: index)
154-
asset app.js 255 bytes [emitted] (name: __html_6d047296_1)
155-
asset styles.css 183 bytes [emitted] (name: __html_6d047296_0)
154+
asset app.js 255 bytes [emitted] (name: src-index-1)
155+
asset styles.css 183 bytes [emitted] (name: src-index-0)
156156
Entrypoint index (545 bytes) = 1 auxiliary asset
157-
Entrypoint __html_6d047296_1 255 bytes = app.js
158-
Entrypoint __html_6d047296_0 183 bytes = styles.css
159-
chunk (runtime: __html_6d047296_0) styles.css (__html_6d047296_0) 81 bytes (css) 0 bytes (runtime) [entry] [rendered]
160-
> ./styles.css __html_6d047296_0
161-
runtime modules 0 bytes 1 module
162-
css ./src/styles.css 81 bytes [built] [code generated]
163-
[no exports]
164-
[used exports unknown]
165-
entry ./styles.css __html_6d047296_0
166-
chunk (runtime: __html_6d047296_1) app.js (__html_6d047296_1) 53 bytes [entry] [rendered]
167-
> ./app.js __html_6d047296_1
168-
./src/app.js 53 bytes [built] [code generated]
169-
[used exports unknown]
170-
entry ./app.js __html_6d047296_1
157+
Entrypoint src-index-1 255 bytes = app.js
158+
Entrypoint src-index-0 183 bytes = styles.css
171159
chunk (runtime: index) (index) 530 bytes [entry]
172160
> ./src/index.html index
173161
./src/index.html 530 bytes [built] [code generated]
174162
[exports: default]
175163
[used exports unknown]
176164
entry ./src/index.html index
165+
chunk (runtime: src-index-0) styles.css (src-index-0) 81 bytes (css) 0 bytes (runtime) [entry] [rendered]
166+
> ./styles.css src-index-0
167+
runtime modules 0 bytes 1 module
168+
css ./src/styles.css 81 bytes [built] [code generated]
169+
[no exports]
170+
[used exports unknown]
171+
entry ./styles.css src-index-0
172+
chunk (runtime: src-index-1) app.js (src-index-1) 53 bytes [entry] [rendered]
173+
> ./app.js src-index-1
174+
./src/app.js 53 bytes [built] [code generated]
175+
[used exports unknown]
176+
entry ./app.js src-index-1
177177
webpack X.X.X compiled successfully
178178
```
179179

180180
## Production mode
181181

182182
```
183183
asset index.html 264 bytes [emitted] [minimized] (auxiliary name: index)
184-
asset styles.css 63 bytes [emitted] [minimized] (name: __html_6d047296_0)
185-
asset app.js 52 bytes [emitted] [minimized] (name: __html_6d047296_1)
184+
asset styles.css 63 bytes [emitted] [minimized] (name: src-index-0)
185+
asset app.js 52 bytes [emitted] [minimized] (name: src-index-1)
186186
Entrypoint index (264 bytes) = 1 auxiliary asset
187-
Entrypoint __html_6d047296_1 52 bytes = app.js
188-
Entrypoint __html_6d047296_0 63 bytes = styles.css
187+
Entrypoint src-index-1 52 bytes = app.js
188+
Entrypoint src-index-0 63 bytes = styles.css
189189
chunk (runtime: index) (index) 530 bytes [entry]
190190
> ./src/index.html index
191191
./src/index.html 530 bytes [built] [code generated]
192192
[exports: default]
193193
[no exports used]
194194
entry ./src/index.html index
195-
chunk (runtime: __html_6d047296_0) styles.css (__html_6d047296_0) 81 bytes (css) 0 bytes (runtime) [entry] [rendered]
196-
> ./styles.css __html_6d047296_0
195+
chunk (runtime: src-index-0) styles.css (src-index-0) 81 bytes (css) 0 bytes (runtime) [entry] [rendered]
196+
> ./styles.css src-index-0
197197
runtime modules 0 bytes 1 module
198198
css ./src/styles.css 81 bytes [built] [code generated]
199199
[no exports]
200200
[no exports used]
201-
entry ./styles.css __html_6d047296_0
202-
chunk (runtime: __html_6d047296_1) app.js (__html_6d047296_1) 53 bytes [entry] [rendered]
203-
> ./app.js __html_6d047296_1
201+
entry ./styles.css src-index-0
202+
chunk (runtime: src-index-1) app.js (src-index-1) 53 bytes [entry] [rendered]
203+
> ./app.js src-index-1
204204
./src/app.js 53 bytes [built] [code generated]
205205
[no exports used]
206-
entry ./app.js __html_6d047296_1
206+
entry ./app.js src-index-1
207207
webpack X.X.X compiled successfully
208208
```

0 commit comments

Comments
 (0)