This repository has been archived by the owner on May 23, 2019. It is now read-only.
v1.0.2 — Support for Browserify/Webpack
This patch release improves support for using Browserify or Webpack to bundle intl-messageformat
. Since the context of these tools is to bundle for the browser, this release will only include the English locale data in the bundle by default. (Previously the data for all locales would be included when bundling with Browserify or Webpack.)
When you need to support another locale in your app and you're using Browserify or Webpack, we recommend the following approach:
// app.js
var IntlMessageFormat = window.IntlMessageFormat = require('intl-messageformat');
// ...
<script src="/app.bundle.js"></script>
<script src="/intl-messageformat/dist/locale-data/fr.js"></script>
This will expose IntlMessageFormat
as a global object in the browser, allowing you to load the script for the locale data you need for the page or current request.
Source Maps Improvements
This release also includes improvements to source maps, making debugging easier.