faker
faker copied to clipboard
feat: adding a browser build
This is a test to add a browser build with iife, still need to test it
Codecov Report
Merging #1001 (d5b0157) into main (0b90342) will increase coverage by
0.00%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #1001 +/- ##
=======================================
Coverage 99.67% 99.67%
=======================================
Files 2111 2111
Lines 225957 225957
Branches 978 979 +1
=======================================
+ Hits 225214 225217 +3
+ Misses 723 720 -3
Partials 20 20
Impacted Files | Coverage Δ | |
---|---|---|
src/modules/finance/index.ts | 100.00% <0.00%> (+0.68%) |
:arrow_up: |
⚠️ ⚠️ ⚠️
This would add additional ~4-5 MB to the package size 👀 We should highly ask ourself if that is worth it 😬 I even would like to get rid of the cjs version one day...
Each of these bundles has its own locales and the locales are around 4 MB in size. If we found a way where every bundle can reuse one bundled locales that would be much better and reduce the size dramatically.
How about we move the locales out into packages and throw a error if you want to use, lets say de like "You trying to use the locale de, please install @faker-js/faker-de" with this the core package would be pretty small
@prisis This would be one idea but horrible to manage If we do that, we might want to fully switch to a monorepo Also IMO we have higher prios right now like #823
Closing this as not planned
Please use script type=module
and follow the docs
Old browsers not supporting type=module
are not supported, use faker 5.5.3
for this