metarhia / swayer

Schema based frontend framework 👀
MIT License
52 stars 11 forks source link

Low browsers support #21

Open Semigradsky opened 2 years ago

Semigradsky commented 2 years ago

Describe the bug Currently, private methods are used in code. By CanIUse data only 84.6% of users on desktop and 77.66% users on mobile have the support of this feature.

As was mentioned on https://github.com/metarhia/swayer/pull/19#issuecomment-1001156224 it is needed to transpile framework code or smth like this.

Expected behavior At least 94% of browsers support.

Additional context

rohiievych commented 2 years ago

We can separate sources from transpiled code in folders src and lib or lib and dist. Then transpile on publish and ship only transpiled version:

{
  "main": "lib/index.js",
  "scripts": {
    "prepublish": "babel src --out-dir lib"
  },
  "babel": {
    "presets": ["es2015"]
  }
}