faker icon indicating copy to clipboard operation
faker copied to clipboard

feat: adding a browser build

Open prisis opened this issue 2 years ago • 4 comments

This is a test to add a browser build with iife, still need to test it

prisis avatar May 25 '22 07:05 prisis

Codecov Report

Merging #1001 (d5b0157) into main (0b90342) will increase coverage by 0.00%. The diff coverage is n/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:

codecov[bot] avatar May 25 '22 07:05 codecov[bot]

⚠️ ⚠️ ⚠️

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.

Shinigami92 avatar May 25 '22 10:05 Shinigami92

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 avatar May 25 '22 11:05 prisis

@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

Shinigami92 avatar May 25 '22 12:05 Shinigami92

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

Shinigami92 avatar Sep 08 '22 17:09 Shinigami92