Skip to content

v1.0.1 — Support for Browserify/Webpack

Compare
Choose a tag to compare
@ericf ericf released this 12 Dec 07:19
· 17 commits to master since this release

This patch release improves support for using Browserify or Webpack to bundle dust-intl. 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 DustIntl = window.DustIntl = require('dust-intl');
// ...
<script src="/app.bundle.js"></script>
<script src="/dust-intl/dist/locale-data/fr.js"></script>

This will expose DustIntl 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.