Mevrael / bunny

BunnyJS - Lightweight native (vanilla) JavaScript (JS) and ECMAScript 6 (ES6) browser library, package of small stand-alone components without dependencies: FormData, upload, image preview, HTML5 validation, Autocomplete, Dropdown, Calendar, Datepicker, Ajax, Datatable, Pagination, URL, Template engine, Element positioning, smooth scrolling, routing, inversion of control and more. Simple syntax and architecture. Next generation jQuery and front-end framework. Documentation and examples available.

Home Page:https://bunnyjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: babelHelpers is not defined

maciej-laskowski opened this issue · comments

Hi,

I get an error in console when I run example on https://bunnyjs.com/examples/form-validation/ (just clicking submit on an empty form in enough).

Firefox 63.0:
ReferenceError: babelHelpers is not defined element.min.js:1:1368

Chrome 69.0.3497.100

element.min.js:1 Uncaught (in promise) ReferenceError: babelHelpers is not defined
    at element.min.js:1
    at new Promise (<anonymous>)
    at Object.scrollTo (element.min.js:1)
    at Object.focusInput (validation.min.js:1)
    at validation.min.js:1

I excluded babel helpers in transpiling options, otherwise you would have babel helpers replicated in each .min.js file.

It should be included manually if you use dists, however, it is recommended to have own build process if you want to support old browsers. BunnyJS works as it is in any modern browser and you don't need babel for that.

You can use already compiled babel helpers and they must be included before BunnyJS https://github.com/Mevrael/bunny/blob/master/dist/babel-helpers.min.js

I'll have a look at your suggested build system. Thank you for your explanation :)