Edge, IE11 broken. Invalid bundling and exports.
See original GitHub issueCurrently bundling for Webpack environments / module environments is broken. In the Webpack build the library is build and transpiled - although in package.json
it only points to the root (unstranspiled) /wpapi.js
file. This is okay for most modern browsers as - only by chance - the features are supported.
Although this is not the case for Edge and IE11 both not supporting the object rest spread operator.
In summary the build is essentially broken for browsers environments - node works.
This long standing issue: https://github.com/WP-API/node-wpapi/issues/426 outlines the case with specific errors.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Internet Explorer (IE) mode troubleshooting and FAQ
How to troubleshoot and fix · Open a new tab in Microsoft Edge and go to edge://net-export. · Select Start Logging to Disk,...
Read more >React Development and Build version not working in IE 11 ...
Development and build version not working in IE 11 and Edge. Here are my webpack config and package json file.
Read more >How To Fix Your Angular App When It's Not Working in IE11
Usually, if the browser does not support a CSS property the styling will look weird (e.g. an element is positioned in the wrong...
Read more >Automation 360 and Internet Explorer 11 EOL FAQ
Due to the difference in the height of the header bar in Internet Explorer and Microsoft Edge with Internet Explorer mode, an incorrect...
Read more >To v5 from v4 - webpack
Upgrade webpack to 5 · Clean up configuration · Need to support an older browser like IE 11? · Cleanup the code ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround for those Webpack / bundler users who want support for Edge and IE 11 you can simply add the “browser” bundle (umd) as an external dependancy. Bundling it via
package.json
(node_modules) will break your build in IE and Edge.Webpack e.g.
Then import as usual:
😦
My suggestion to the authors would be to write the library in ES then transpile to CJS and UMD. That way we are working from best case to worst case, smallest footprint.
If you want to avoid editing the Webpack config and/or including it using a script tag you can also import the browser bundle directly: