Intl.js icon indicating copy to clipboard operation
Intl.js copied to clipboard

Updated documentation example for webpack 3

Open maxlapides opened this issue 7 years ago • 0 comments

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.

maxlapides avatar Dec 13 '17 21:12 maxlapides