Skip to content

9.0.5 Dynamic imports not extracted to chunks #8550

@thebuilder

Description

@thebuilder

Bug report

Describe the bug

After upgrading from 9.0.4 to 9.0.5, dynamic(() => import()) are now all merged into commons.js, and no chunks are exported. Before it would create a new chunk for each.

It only happens when building for prodution with target: serverless. Running in development, the chunks are still generated correctly

Example

I've created a simple Codesandbox that just adds a single import(). It correctly chunks and loads the chunk on 9.0.4.

See the Network Requests.

Expected behavior

When using the dynamic imports, they should be extracted into chunks by Webpack.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions