Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 7f34a58

Browse files
committed
fixes #118: ignoring the inclusion of all locale date when bundling the polyfill with browserify/webpack.
1 parent 63fc52a commit 7f34a58

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
var m = require('./lib/core.js'),
22
IntlPolyfill = m.default;
33

4-
// add locale data for all locales into runtime
4+
// Expose `IntlPolyfill` as global to add locale data into runtime later on.
55
global.IntlPolyfill = IntlPolyfill;
6+
7+
// Require all locale data for `Intl`. This module will be
8+
// ignored when bundling for the browser with Browserify/Webpack.
69
require('./locale-data/complete.js');
710

811
// hack to export the polyfill as global Intl if needed

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
"directories": {
88
"test": "tests"
99
},
10+
"browser": {
11+
"./locale-data/complete": false,
12+
"./locale-data/complete.js": false
13+
},
1014
"devDependencies": {
1115
"async": "^0.9.0",
1216
"cldr-cal-buddhist-full": "^27.0.3",

0 commit comments

Comments
 (0)