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

Commit 86387c7

Browse files
committed
adjusting the polyfilling process for browsers
1 parent 4d75e49 commit 86387c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/build-dist.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import uglify from 'rollup-plugin-uglify';
99

1010
const isProduction = process.env.NODE_ENV === 'production';
1111

12-
const entry = p.resolve('src/main.js');
12+
const entry = p.resolve('src/browser-main.js');
1313
const dest = p.resolve(`dist/Intl.${isProduction ? 'min.js' : 'js'}`);
1414

1515
const bundleConfig = {

src/main.js src/browser-main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import IntlPolyfill from "./core.js";
22

33
// hack to export the polyfill as global Intl if needed
4-
if (typeof Intl !== 'undefined') {
4+
if (typeof Intl === 'undefined') {
55
try {
66
Intl = IntlPolyfill;
77
IntlPolyfill.__applyLocaleSensitivePrototypes();

0 commit comments

Comments
 (0)