Skip to content

Commit 19ef578

Browse files
committed
Add note about Nano ID 3
1 parent 13bd1b5 commit 19ef578

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ Test configuration: ThinkPad X1 Carbon Gen 9, Fedora 36, Node.js 18.9.
137137
npm install --save nanoid
138138
```
139139

140+
Nano ID 4 works only with ESM projects in tests or Node.js scripts.
141+
For CommonJS you need Nano ID 3.x (we still support it):
142+
143+
```bash
144+
npm install --save nanoid@3
145+
```
146+
140147
For quick hacks, you can load Nano ID from CDN. Though, it is not recommended
141148
to be used in production because of the lower loading performance.
142149

README.ru.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ _См. также хорошую статью о теориях генерато
144144
npm install --save nanoid
145145
```
146146

147+
Nano ID 4 работает только с ESM-проектами в тестах или скриптах дял Node.js.
148+
Для CommonJS вам нужен Nano ID 3.x (мы ещё всё ещё поддерживаем):
149+
150+
```bash
151+
npm install --save nanoid@3
152+
```
153+
147154
Для быстрого прототипирования вы можете подключить Nano ID с CDN без установки.
148155
Не используйте этот способ на реальном сайте, так как он сильно бьёт
149156
по скорости загрузки сайта.

0 commit comments

Comments
 (0)