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: docs/migration/index.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,19 +42,19 @@ If you use the [`--configPlugin`](../command-line-interface/index.md#configplugi
42
42
43
43
Some options now have different default values. If you think you experience any issues, try adding the following to your configuration:
44
44
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
+
});
58
58
```
59
59
60
60
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
71
71
72
72
## Changes to the Plugin API
73
73
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.
75
75
76
76
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.
0 commit comments