Skip to content

Commit e577afe

Browse files
authored
add hint about webpack to MIGRATION.md (#2358)
* add hint about webpack to MIGRATION.md * Update MIGRATION.md
1 parent 1366644 commit e577afe

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

MIGRATION.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,23 @@
2929
# Migration information
3030

3131
- [Migration information](#migration-information)
32-
- [Migration to contentful.js 10.x](#migration-to-contentfuljs-10x)
32+
- [Migration to version 11.x](#migration-to-version-11x)
3333
- [Breaking changes](#breaking-changes)
34+
- [Node.js core modules](#nodejs-core-modules)
35+
- [Webpack 5](#webpack-5)
36+
- [Rollup](#rollup)
37+
- [Improvements](#improvements)
38+
- [Tree shaking](#tree-shaking)
39+
- [Module support and package configuration](#module-support-and-package-configuration)
40+
- [Testing framework](#testing-framework)
41+
- [Security](#security)
42+
- [Removal of eval](#removal-of-eval)
43+
- [Migration to contentful.js 10.x](#migration-to-contentfuljs-10x)
44+
- [Breaking changes](#breaking-changes-1)
3445
- [Version compatibility](#version-compatibility)
3546
- [Response modifiers](#response-modifiers)
47+
- [Query params `resolveLinks` and `removeUnresolved`](#query-params-resolvelinks-and-removeunresolved)
48+
- [Query param `locale='*'`](#query-param-locale)
3649
- [TypeScript](#typescript)
3750
- [Migration to contentful.js 9.x](#migration-to-contentfuljs-9x)
3851
- [Migration to contentful.js 8.x](#migration-to-contentfuljs-8x)
@@ -64,6 +77,29 @@ Pre-bundled code
6477

6578
Pre-bundled code for Node.js is no longer provided. If your setup relies on pre-bundled packages, you may need to adjust your build configuration.
6679

80+
##### Webpack 5
81+
82+
To make our project bundle properly for the browser with Webpack 5, you need to add this to your configuration:
83+
84+
```js
85+
module.exports = {
86+
resolve: {
87+
fallback: {
88+
os: false,
89+
zlib: false,
90+
tty: false,
91+
},
92+
},
93+
};
94+
```
95+
96+
##### Rollup
97+
98+
To make our project bundle properly for the browser with Rollup, you need to add this to your configuration:
99+
100+
```js
101+
nodeResolve({ browser: true, preferBuiltins: false })
102+
```
67103

68104
### Improvements
69105

0 commit comments

Comments
 (0)