Commit 3b2c061
committed
feat: add sideEffects configuration
Only /encoding.js export has side-effects, and those
side-effects are internal.
It is documented to load multi-byte codecs for both this import
and future /encoding-lite.js imports, even if the current import
does not use the provided TextDecoder.
This is because /encoding.js and /encoding-lite.js are designed
to return the exact same TextDecoder class and methods, and loading
full implementation provides multi-byte encodings support everywhere.
The usecase is that /encoding-lite.js can potentially be used as a
global polyfill, and the setup has to avoid polyfill conflicts if
something loads /encoding.js and then something else replaces it
with /encoding-lite.js1 parent 7767772 commit 3b2c061
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
0 commit comments