Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #20 from ericf/browserify
Browse files Browse the repository at this point in the history
Improve browser bundling with Browserify/Webpack
  • Loading branch information
ericf authored and longlho committed May 28, 2019
1 parent 7d19e47 commit be212ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/intl-relativeformat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

'use strict';

var IntlRelativeFormat = require('./lib/core').default;
var IntlRelativeFormat = require('./lib/main').default;

// Add all locale data to `IntlRelativeFormat`;
// Add all locale data to `IntlRelativeFormat`. This module will be ignored when
// bundling for the browser with Browserify/Webpack.
require('./lib/locales');

// Set the default locale to English.
IntlRelativeFormat.defaultLocale = 'en';

// Re-export `IntlRelativeFormat` as the CommonJS default exports with all the
// locale data registered, and with English set as the default locale. Define
// the `default` prop for use with other compiled ES6 Modules.
Expand Down
4 changes: 4 additions & 0 deletions packages/intl-relativeformat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
},
"main": "index.js",
"jsnext:main": "src/main.js",
"browser": {
"./lib/locales": false,
"./lib/locales.js": false
},
"dependencies": {
"intl-messageformat": "1.0.1"
},
Expand Down

0 comments on commit be212ea

Please sign in to comment.