Skip to content

Commit 4ac4d7c

Browse files
fix: add language to code block
1 parent 504fcb9 commit 4ac4d7c

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

src/content/configuration/output.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,13 +1604,19 @@ export default {
16041604
},
16051605
},
16061606
};
1607-
In this case, the default export of your entry module is assigned to the library name:
1607+
```
1608+
1609+
In this case, the entry module's `default export` is assigned to the library name.
16081610

1611+
```js
16091612
const MyLibrary = _entry_return_.default;
1610-
Example: exporting a nested property
1613+
```
1614+
1615+
### Example: exporting a nested property
16111616

16121617
You can also pass an array to define a path to a specific export:
16131618

1619+
```js
16141620
export default {
16151621
output: {
16161622
library: {
@@ -1620,7 +1626,12 @@ export default {
16201626
},
16211627
},
16221628
};
1629+
```
1630+
1631+
```js
16231632
const MyLibrary = _entry_return_.default.subModule;
1633+
```
1634+
16241635
### output.library.auxiliaryComment
16251636

16261637
Add a comment in the UMD wrapper.

src/content/contribute/writers-guide.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ Please do not assume things are simple. Avoid words like 'just', 'simply'.
155155

156156
### Configuration defaults and types
157157

158-
159158
Webpack configuration defaults can vary depending on the selected mode. The two used are `development` and `production`, and each applies different default optimizations.
160159

161160
#### Development mode defaults
@@ -178,8 +177,9 @@ Webpack configuration defaults can vary depending on the selected mode. The two
178177
module.exports = {
179178
mode: "development",
180179
};
180+
```
181181

182-
Always provide types and defaults to all of the documentation options in order to keep the documentation accessible and well-written. We are adding types and defaults after entitling the documented option:
182+
Always provide types and defaults for all documented options to keep the documentation clear and accessible. Types and defaults should be added after introducing the option.
183183

184184
**configuration.example.option**
185185

@@ -247,3 +247,7 @@ An example can be found on the [`options` section of the EvalSourceMapDevToolPlu
247247
### Adding links
248248

249249
Please use relative URLs (such as `/concepts/mode/`) to link our own content instead of absolute URLs (such as `https://webpack.js.org/concepts/mode/`).
250+
251+
```js
252+
253+
```

0 commit comments

Comments
 (0)