ceri-comps / ceri-icon

webpack based - load only what you need - svg inline icons
30 stars 2 forks source link

Only in iPad Safari browser, failed to load the code built by BabelJS #9

Open hb-shanmuk opened 6 years ago

hb-shanmuk commented 6 years ago

What I have in .babelrc is

  {
    "presets": [
      ["env", { "modules": false }],
      "stage-2"
    ],
    "plugins": ["transform-runtime", "transform-es2015-arrow-functions", "transform-class-properties"],
    "env": {
      "test": {
        "presets": ["env", "stage-2"],
        "plugins": ["transform-es2015-modules-commonjs", "dynamic-import-node"]
      },
      "production": {
        "presets": ["minify"]
      },
      "staging": {
        "presets": ["minify"]
      }
    }
  }

Here is the exact error log

SyntaxError: Unexpected token '>'

eval — app.js:1126
./node_modules/ceri/lib/wrapper.js — app.js:1126
webpack_require — app.js:20
(anonymous function)
Eval Code
eval
./node_modules/ceri-icon/lib/icon.js — app.js:993
webpack_require — app.js:20
(anonymous function)
Eval Code
eval
./src/mixins/ceri-icon.js — app.js:8907
webpack_require — app.js:20
Eval Code
eval
./src/mixins/helpers.js — app.js:8939
webpack_require — app.js:20
Eval Code
eval
./src/app.js — app.js:8028
webpack_require — app.js:20
Eval Code
eval
./src/main.js — app.js:8891
webpack_require — app.js:20
(anonymous function) — app.js:63
Global Code — app.js:64

In node_modules/ceri/lib/wrapper.js code where showing error is

this._crCb.forEach(cb => {
  cb.call(this)
})

Even though provided all the dependency plugins for babel to compile ES6 code still I am getting the same issue(Only on iPad safari).