Questions tagged [babel-6]

Babel is a compiler and compiles JavaScript (EcmaScript 5) to EcmaScript 6 (AKA ES2015).

Babel makes EcmaScript 6 and its class based approach available in the browser today via use of a Babel script tag.

It is also available in NodeJS, typically using the babel-node command.

Babel 6 is noted for its performance optimizations.

12 questions
7
votes
2 answers

How to get webpack2 and underscore-template loader + babel to work without getting "Module build failed: SyntaxError: 'with' in strict mode (5:0)"

I have a underscore template loader in my webpack2 config that is transpiled with babel. It fails at compile time because with is used in the code compiled code. Here is the relevant part in my loaders in webpack.config.js: I have this section under…
Sylwester
  • 47,942
  • 4
  • 47
  • 79
6
votes
1 answer

Value of "this" is incorrect when debugging Babel transpiled React with Chrome Devtools

I have a React application that is transpiled with Babel using the following .babelrc configuration { "presets": [ "es2015", "stage-1", "react" ], "plugins": [ "transform-decorators-legacy" ] } The application transpiles and…
4
votes
1 answer

ES2016 code reuse between Aurelia applications

While working on a number of Aurelia applications we reached the point that we need to share code between these applications. The code to be shared is not something we (actually our customer) would like to be open sourced. So we were thinking of…
Andrew
  • 5,395
  • 1
  • 27
  • 47
3
votes
1 answer

Aurelia/Babel 6 sourcemaps shown as html

I have an aurelia application updated to the latest beta, 1.0.0-beta.1.2.1 at the time of this writing. This version of aurelia already uses Babel 6, and my application is based on the based on the ASP.NET 5 ES2016 navigation skeleton. "All of a…
Sergi Papaseit
  • 15,999
  • 16
  • 67
  • 101
2
votes
0 answers

Should I use babel preset 'stage-2'?

I had to install babel dynamic import plugin and as a result I also added 'stage-2' to presets array. From the documentation I see that preset 'stage-2' already includes dynamic import…
alexlz
  • 618
  • 1
  • 10
  • 24
1
vote
1 answer

this is resolved to undefined in UMD module by babel

I had already posted a question about this, i managed to solve it with a workaround but now i have multiple UMD modules, third party modules, and it no longer makes sense to change the module myself to make it transpile. this is what my .babelrc…
kfc
  • 291
  • 7
  • 24
1
vote
0 answers

The (object-assign) Babel 5 plugin is being run with Babel 6

After updating project dependencies I started seeing this error, there appears to be a versioning problem with the object-assign Babel 5 plugin. After the update I use Babel 6, the closest plugin I could find is es6-object-assign, but the use of it…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
1
vote
0 answers

What's the best way to reference a js ArrayBuffer using React/Babel6?

I am trying to update a canvas using a react component with processing done in a worker thread. I have all the hard parts working fine in EMCA5, but porting to React/Babel/JSX, my biggest hangup is the system no longer recognizes ArrayBuffer to pass…
1
vote
1 answer

babeljs class static in constructor

The question is how to get access to class static properties from within a constructor before super method was called? class A { constructor(input) { console.log('A', typeof new.target); } } class B extends A { static template =…
vbarbarosh
  • 3,502
  • 4
  • 33
  • 43
1
vote
0 answers

ReferenceError: [BABEL] unknown: Using removed Babel 5 option: base.blacklist

I'm getting this error while running my gulpfile. I'm assuming that there's something wrong with my Babel version. Here is my package.json { "name": "riotjs-es6-structure", "version": "1.0.0", "description": "", "main": "gulpfile.js", …
0
votes
1 answer

Babel is examining the package.json of a target module for configuration when transpiling

I have an issue where I want to transpile the ...spread operator of a package I'm using. Note that I'm using babel 6, in the context of ejected create-react-app at scripts version 1.1.5. I have a minimal reproduction for this. I can't find it now,…
dwjohnston
  • 11,163
  • 32
  • 99
  • 194
0
votes
1 answer

How transpile via IDE ES6 to ES5 (and React-JSX) with WebStorm on Win10 with Babel6?

A lot of sources explain that for this you need to create a "File Watcher"-Job in the WebStorm-Settings (Tools) define a "Scope" in WebStorm for the files you want to process define a .babelrc file for configuration. Babel will use this…
staeppvargen
  • 143
  • 10