Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Updated documentation example for webpack 3 #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxlapides
Copy link

According to the latest webpack docs, "require.ensure() is specific to webpack and superseded by import()." (https://webpack.js.org/api/module-methods/#require-ensure). The new import() syntax aligns with the ES2015 spec (https://webpack.js.org/api/module-methods/#import-).

Note that the require.ensure() syntax relies on Promise internally, so if used with older browsers, a polyfill for Promise would be required. The import() syntax uses Promises explicitly, making this requirement more explicit to developers.

I pulled this code snippet from my application, which I tested in IE10 because it doesn't have support for Intl.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant