You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: assets/articles/0048-webpack-plugin-written-by-chatgpt/webpack-plugin-written-by-chatgpt.adoc
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,15 @@ A lot of my focus lately is on ModuleFederation and webpack. I asked myself what
14
14
15
15
The first question I asked the site:
16
16
17
+
[.block-citation]
17
18
[quote,Zackary Chapple]
18
19
____
19
-
Create a webpack plugin in typescript that wraps module federation and adds additional logging"
20
+
Create a webpack plugin in typescript that wraps module federation and adds additional logging
20
21
____
21
22
22
23
23
24
Below is the first reply:
24
-
25
+
[.block-citation]
25
26
[quote, The AI]
26
27
____
27
28
To create a webpack plugin in TypeScript that wraps module federation and adds additional logging, you can follow these steps:"
@@ -127,11 +128,15 @@ ____
127
128
128
129
You can see that the last code block is incomplete. Sometimes, on more lengthy requests, the chatbot can time out, I tried, quite literally, asking it to keep going.
129
130
130
-
"Keep going"
131
-
-- Zackary Chapple
131
+
[.block-citation]
132
+
[quote, Zackary Chapple]
133
+
____
134
+
Keep going
135
+
____
136
+
132
137
133
138
"Sure, here are the next steps:", said ChatGPT
134
-
139
+
[.block-citation]
135
140
[quote, The AI]
136
141
____
137
142
@@ -202,7 +207,7 @@ ____
202
207
== Modifying the results
203
208
204
209
Seeing what the results were it was quite verbose, but it does not follow the platform I usually like to use, https://dev.to/nrwl_io[@nrwl_io's, window=_blank] Nx. So I did a redirect on the conversation.
205
-
210
+
[.block-citation]
206
211
[quote, Zackary Chapple]
207
212
____
208
213
how can I simplify the steps by using Nx
@@ -289,14 +294,14 @@ In the libs/module-federation-logging-plugin/src/index.ts file, export the Modul
289
294
== Second timeout
290
295
291
296
You can see that I received another timeout due to the length of the response. This time instead of just asking it to continue I tried to get it to pick back up from step 7 which was incomplete.
292
-
297
+
[.block-citation]
293
298
[quote, Zackary Chapple]
294
299
____
295
300
Repeat the content of step 7 and keep going
296
301
____
297
302
298
303
And the chat-bot said:
299
-
304
+
[.block-citation]
300
305
[quote, The AI]
301
306
____
302
307
Sure, here is the content of step 7:
@@ -354,14 +359,14 @@ ____
354
359
== One more tweak
355
360
356
361
Just to see how far I can go I wanted to add some documentation. No plugin is complete without documentation right?
357
-
362
+
[.block-citation]
358
363
[quote, Zackary Chapple]
359
364
____
360
365
Can you add swagger documentation to the src/module-federation-logging-plugin.ts file
361
366
____
362
367
363
368
And the chat-bot delivered the following:
364
-
369
+
[.block-citation]
365
370
[quote, The AI]
366
371
____
367
372
To add Swagger documentation to the src/module-federation-logging-plugin.ts file, you can use Swagger annotations in the form of JSDoc comments. JSDoc is a documentation standard for JavaScript that is widely supported by tools like Swagger.
0 commit comments