Skip to content

Commit fad3989

Browse files
authored
Update README.md (#816)
- Add missing section of localized build for ES module.
1 parent 76b5654 commit fad3989

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,30 @@ npm run build build-npm-zh-TW
16601660

16611661
This will create a binary `npm__zh_tw.js` in the `dist/` folder.
16621662

1663+
To build a localized ES module of FirebaseUI, run:
1664+
1665+
```bash
1666+
npm run build build-esm-{LANGUAGE_CODE}
1667+
```
1668+
1669+
Make sure all underscore symbols in the `LANGUAGE_CODE` are replaced with
1670+
dashes.
1671+
This will generate `dist/esm__{LANGUAGE_CODE}.js`.
1672+
You can then import/require it:
1673+
```javascript
1674+
import firebaseui from './esm__{LANGUAGE_CODE}';
1675+
```
1676+
1677+
Build names for language codes with underscores, eg. `zh_tw`, `zh_cn`, `pt_pt`
1678+
will be mapped to `zh-TW`, `xh-CN`, `pt-PT`. The underscore will be replaced by
1679+
a hyphen symbol and the subsequent characters will be capitalized.
1680+
1681+
```bash
1682+
npm run build build-esm-zh-TW
1683+
```
1684+
1685+
This will create a binary `esm__zh_tw.js` in the `dist/` folder.
1686+
16631687
### Running the demo app
16641688

16651689
To run the demo app, you must have a Firebase project set up on the

0 commit comments

Comments
 (0)