Skip to content

Commit b362fb9

Browse files
Minor migration guide improvements (#4823)
* Add js highlight to "Changed Defaults" in migration guide * Fix / places * Add parentheses Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
1 parent e52495b commit b362fb9

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

docs/migration/index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ If you use the [`--configPlugin`](../command-line-interface/index.md#configplugi
4242

4343
Some options now have different default values. If you think you experience any issues, try adding the following to your configuration:
4444

45-
```
46-
{
47-
makeAbsoluteExternalsRelative: true,
48-
preserveEntrySignatures: 'strict',
49-
output: {
50-
esModule: true,
51-
generatedCode: {
52-
reservedNamesAsProps: false
53-
},
54-
interop: 'compat',
55-
systemNullSetters: false
56-
}
57-
}
45+
```js
46+
({
47+
makeAbsoluteExternalsRelative: true,
48+
preserveEntrySignatures: 'strict',
49+
output: {
50+
esModule: true,
51+
generatedCode: {
52+
reservedNamesAsProps: false
53+
},
54+
interop: 'compat',
55+
systemNullSetters: false
56+
}
57+
});
5858
```
5959

6060
In general, though, the new default values are our recommended settings. Refer to the documentation of each setting for more details.
@@ -71,7 +71,7 @@ By default, when generating `cjs` output, Rollup will now keep any external, i.e
7171

7272
## Changes to the Plugin API
7373

74-
Then general output generation flow has been reworked, see the [Output Generation Hooks](../plugin-development/index.md#output-generation-hooks) graph for the new plugin hook order. Probably the most obvious change is that the [`banner`](../plugin-development/index.md#banner)[`/footer`](../plugin-development/index.md#footer)[`/intro`](../plugin-development/index.md#intro)[`/outro`](../plugin-development/index.md#outro) are no longer invoked once at the beginning but rather per chunk. On the other hand, [`augmentChunkHash`](../plugin-development/index.md#augmentchunkhash) is now evaluated after [`renderChunk`](../plugin-development/index.md#renderchunk) when the hash is created.
74+
Then general output generation flow has been reworked, see the [Output Generation Hooks](../plugin-development/index.md#output-generation-hooks) graph for the new plugin hook order. Probably the most obvious change is that the [`banner`](../plugin-development/index.md#banner)/[`footer`](../plugin-development/index.md#footer)/[`intro`](../plugin-development/index.md#intro)/[`outro`](../plugin-development/index.md#outro) are no longer invoked once at the beginning but rather per chunk. On the other hand, [`augmentChunkHash`](../plugin-development/index.md#augmentchunkhash) is now evaluated after [`renderChunk`](../plugin-development/index.md#renderchunk) when the hash is created.
7575

7676
As file hashes are now based on the actual content of the file after `renderChunk`, we no longer know exact file names before hashes are generated. Instead, the logic now relies on hash placeholders of the form `!~{001}~`. That means that all file names available to the `renderChunk` hook may contain placeholders and may not correspond to the final file names. This is not a problem though if you plan on using these files names within the chunks as Rollup will replace all placeholders before [`generateBundle`](../plugin-development/index.md#generatebundle) runs.
7777

0 commit comments

Comments
 (0)