victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

Getting "Cannot read property 'jQuery' of undefined" after passing throw babel #628

Open radiocity opened 7 years ago

radiocity commented 7 years ago
const 
    gulp = require("gulp"), 
    babel = require('gulp-babel'),
    formvalidator = "node_modules/jquery-form-validator/form-validator/jquery.form-validator.js";
gulp.src(formvalidator)
    .pipe(babel({
        presets: ['babel-preset-es2015-ie'].map(require.resolve)
    }))
    .pipe(gulp.dest(path.resolve("../public_html/assets/js")));

After including jquery.form-validator.js into project, getting error Uncaught TypeError: Cannot read property 'jQuery' of undefined at line 13

If babel turned off all works fine.