Skip to content

v1.0.1 — Support for Browserify/Webpack

Compare
Choose a tag to compare
@ericf ericf released this 12 Dec 06:45
· 27 commits to master since this release

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

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

Fixed Bug Formatting the Epoch Timestamp 0

Fixed issue #47 where the Epoch timestamp 0 was incorrectly treated as a falsy value.

Source Maps Improvements

This release also includes improvements to source maps, making debugging easier.