Skip to content

add hint about webpack to MIGRATION.md #2358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,23 @@
# Migration information

- [Migration information](#migration-information)
- [Migration to contentful.js 10.x](#migration-to-contentfuljs-10x)
- [Migration to version 11.x](#migration-to-version-11x)
- [Breaking changes](#breaking-changes)
- [Node.js core modules](#nodejs-core-modules)
- [Webpack 5](#webpack-5)
- [Rollup](#rollup)
- [Improvements](#improvements)
- [Tree shaking](#tree-shaking)
- [Module support and package configuration](#module-support-and-package-configuration)
- [Testing framework](#testing-framework)
- [Security](#security)
- [Removal of eval](#removal-of-eval)
- [Migration to contentful.js 10.x](#migration-to-contentfuljs-10x)
- [Breaking changes](#breaking-changes-1)
- [Version compatibility](#version-compatibility)
- [Response modifiers](#response-modifiers)
- [Query params `resolveLinks` and `removeUnresolved`](#query-params-resolvelinks-and-removeunresolved)
- [Query param `locale='*'`](#query-param-locale)
- [TypeScript](#typescript)
- [Migration to contentful.js 9.x](#migration-to-contentfuljs-9x)
- [Migration to contentful.js 8.x](#migration-to-contentfuljs-8x)
Expand Down Expand Up @@ -64,6 +77,29 @@ Pre-bundled code

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.

##### Webpack 5

To make our project bundle properly for the browser with Webpack 5, you need to add this to your configuration:

```js
module.exports = {
resolve: {
fallback: {
os: false,
zlib: false,
tty: false,
},
},
};
```

##### Rollup

To make our project bundle properly for the browser with Rollup, you need to add this to your configuration:

```js
nodeResolve({ browser: true, preferBuiltins: false })
```

### Improvements

Expand Down