Questions tagged [babelify]

Babelify plugs Babel's transpilation tools into the Browserify pipeline.

53 questions
2
votes
1 answer

ES7 Mobx Decorators with Babelify 7 and browserify, unexpected token @

Trying to use Mobx Decorators with Babelify 7.3.0 and Browserify 14.4.0. Admitedly, very new to this and this is a first time setup of this stack. Getting syntax errors on the decorators from babel. { SyntaxError:…
light24bulbs
  • 2,871
  • 3
  • 24
  • 33
1
vote
1 answer

ParseError: 'import' and 'export' may appear only with 'sourceType: module' - swiper.esm.js

I've a problem with gulp and browserify. I want minify my index.js but he's import a figure.js with import 'swiper'. And Swiper contains "import" and "export" too. My package.json { "name": "gulp-frontend-kit", "version": "2.0.0", …
ThomasDM
  • 11
  • 2
1
vote
1 answer

Chrome breakpoints does not work with browserify and babelify

I am trying to debug my app on chrome. I was using typescript before and it was working fine. But when i switched to javascript with browserify and babelify break points are not triggered anymore. I can see original file source. I can put…
aliemre
  • 109
  • 3
  • 12
1
vote
0 answers

trying to load vue-agile but ParseError

I'm building a website using vuejs and trying to load agile-vue to use globally in the vue app. So I added following code into main.js: var VueAgile = require('vue-agile'); Vue.use(VueAgile); Later on I use browserify with babelify and envify to…
1
vote
0 answers

Babelify not transforming arrow function in Vue Components

I am trying to use Vue Single File Components with a Gulp build system. Gulp should transform the files with Vueify and Babel, but neither of them are transforming arrow functions. package.json { "dependencies": { "@babel/cli": "7.4.4", …
BishopZ
  • 6,269
  • 8
  • 45
  • 58
1
vote
0 answers

Matomo script does not work after babelify

I want to use Matomo (Piwik) inside my website. But for some reason the Matomo code does not work properbly when using babelify. This is the pure matomo.js file: var _paq = _paq || []; /* tracker methods like "setCustomDimension" should be called…
tomole
  • 927
  • 3
  • 12
  • 35
1
vote
1 answer

gulp builds incomplete when building new components

Full disclosure: I opened a question very similar to this when eliminating npm and node. You can find that question at: npm i and npm update breaking gulp, browserify builds . Albeit somewhat similar to this question, the root of that question was…
TomJ
  • 310
  • 1
  • 2
  • 19
1
vote
2 answers

Browserify, react, and the conditional operator

I cannot get browserify to compile a react file in which I'm trying to use a conditional to render. The render function: render() { const hasObjects = this.state.objects.length === 0 ? false : true; return {hasObjects ? (

Objects

) :…
K. Shores
  • 875
  • 1
  • 18
  • 46
1
vote
1 answer

Error when bundling javascript files into one

I am trying to bundle all my javascript files into one file using the command npm run build (which uses browserify, babelify internally). I am getting the following error. What am I missing? npm output: wpshout-react-quiz@1.0.0 bundle-js…
Ajit Goel
  • 4,180
  • 7
  • 59
  • 107
1
vote
1 answer

How to run browserify without ecmascript-6 transpilation?

Recently I stumbled upon a library for nodejs, that I want to use in a frontend project. Because the whole project is developed in ES6, the library should not be transpiled (we only develop for browsers, supporting es6). Of course, I could…
SeDav
  • 761
  • 7
  • 19
1
vote
0 answers

browserify in gulp before babel is not working

I'm trying to use babelify and I cannot make it work? Am I missing something? In the example that is one of my tasks. I added babelify which is working well and now I need to add browserify. Thanks! const config = require('./gulp.config.js')(); …
NoHoney_k1ll
  • 251
  • 3
  • 12
1
vote
2 answers

Error: Cannot find module using browserify + babelify

I seem to have React and ReactDOM working perfectly fine with Browserify, but when ever I attempt to import/require my own modules in the same directory, apparently can't find it! Error events.js:160 throw er; // Unhandled 'error' event …
Ajm113
  • 320
  • 1
  • 13
1
vote
0 answers

error using browserify with babelify "'import' and 'export' may apper only with 'sourceType: module'"

I'm getting Error: Parsing file app.js: 'import' and 'export' may appear only with 'sourceType: module' (1:0) while using gulp with browserify and babelify I only get the issue with one specific import vue-masked-input my gulp task looks like…
phper
  • 307
  • 2
  • 12
1
vote
1 answer

What Babelify presets/plugins am I missing to parse this code?

I'm using a Rails 4.0 project that implements Browserify-Rails to implement Babelify. Everything seems to be going hunky dory on my local, and remote Beta server. But when I deploy to production, certain files will be skipped if they have in them,…
Trip
  • 26,756
  • 46
  • 158
  • 277
0
votes
0 answers

browserify + gulp + babelify issues

I am trying to transpile my es6 code to es5 using gulp. My gulpfile.babel.js file is as - var gulp = require('gulp') var connect = require('gulp-connect') var open = require('gulp-open') var babelify = require('babelify') var source =…
leoOrion
  • 1,833
  • 2
  • 26
  • 52