Skip to content

Version 4.10.0 breaks compatibility with older browsers that do not have Object.entries #4543

Closed
@weijarz

Description

@weijarz

Bug report

Actual Behavior

Old browsers throws exception on 4.10.0: no method Object.entries
Version 4.9.x works.

The problem is with this file:

const enabledFeatures = Object.entries(features);

core-js polyfill does not work because this file was loaded before it.

Expected Behavior

How Do We Reproduce?

Please paste the results of npx webpack-cli info here, and mention other relevant information

System:
OS: Linux 5.15 Arch Linux
CPU: (4) x64 Intel(R) Core(TM) i3-5020U CPU @ 2.20GHz
Memory: 5.07 GB / 7.67 GB
Binaries:
Node: 16.16.0 - /usr/bin/node
npm: 8.15.1 - /usr/bin/npm
Browsers:
Firefox: 103.0.2
Packages:
css-loader: ^6.5.1 => 6.7.1
file-loader: ^6.2.0 => 6.2.0
postcss-loader: ^7.0.1 => 7.0.1
replace-bundle-webpack-plugin: ^1.0.0 => 1.0.0
source-map-loader: ^4.0.0 => 4.0.0
style-loader: ^3.3.1 => 3.3.1
ts-loader: ^9.2.6 => 9.3.1
url-loader: ^4.1.1 => 4.1.1
webpack: ^5.74.0 => 5.74.0
webpack-bundle-analyzer: ^4.5.0 => 4.6.0
webpack-cli: ^4.10.0 => 4.10.0
webpack-dev-server: ~4.10.0 => 4.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions