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.
https://bunnyjs.com
MIT License
487 stars 39 forks source link

ReferenceError: babelHelpers is not defined #30

Closed maciej-laskowski closed 6 years ago

maciej-laskowski commented 6 years ago

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
Mevrael commented 6 years ago

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

maciej-laskowski commented 6 years ago

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