Questions tagged [transpiler]

A transpiler is a compiler that translates the source code of one high-level programming language to the source code of another high-level programming language.

Transpilers are also known as compilers.

429 questions
0
votes
1 answer

Shim ES3 to ES7 ??? something like Babel?

please, I need your help: I have this problem: I'm working with an old system in asp.net, the Javascript for these aspx pages was implemented with ES3 so I cant run these pages on Microsoft Edge (ES7). I need something similar to babel but with…
0
votes
0 answers

How to generate single js with gulp-babel

I'm trying to get gulp-babel working as the only other way I've been able to do it is with webpack at the moment. It's all great that you can do your single layer script but the minute you start doing imports it doesn't include the script. For…
Pocketninja
  • 395
  • 1
  • 12
0
votes
1 answer

Dot notation property accessor in IE11

I'm testing ReactJs app on IE 11.248.16299.0 and currently get this error: "SCRIPT1010: Expected identifier" on line containing: exports.default = assertString; Now I know this error means that IE can not understand dot notation and if I would…
Medardas
  • 531
  • 2
  • 8
  • 21
0
votes
0 answers

HTML page not running JavaScript (transpiled by Babel)

I'm trying to port my JavaScript source code to JavaScript ES6. To acomplish this I have so far: 1) installed Babel to my project folder 2) created .babelrc file 3) defined the file watcher in my WebStorm to auto transpile JavaScript…
Lucas Sousa
  • 192
  • 3
  • 14
0
votes
1 answer

javascript - Transpiling ES6 arrow functions or named functions - what is better?

The ECMAScript 6 standard added many new features to the JavaScript language, including a new arrow function notation. At the moment I transpile my code to es6. Now there are sometimes two options. And I wonder which one is the better. Use a named…
astridx
  • 6,581
  • 4
  • 17
  • 35
0
votes
0 answers

How do Wrapper, Bindings, Shims and Transpilers relate to each other

I recently read this question here in SO and checked the links in the answer, but I am not sure I have fully understood it correctly. Also, I would like to learn how these definitions compare to a concept which I think is related, namely…
Alvai
  • 23
  • 1
  • 7
0
votes
1 answer

Transpile/Compile js files to work in ie11

I write some js files, and use some key words as async, await, lambda expressions and some functions of ecmas6. This work fine in chrome but I need that work in ie 11. I find an example that transpile the files from src folder to lib, usign babel,…
dev-cc
  • 434
  • 3
  • 13
0
votes
1 answer

Using Babel etc to add run-time type checking to Javascript

I would like to add custom typing to javascript using a tool like Babel (or similar) to add run-time typing and many other basic error checks into the language but I'm having basic issues simply getting a basic example to work. I have tried using a…
Tony J Watson
  • 629
  • 2
  • 9
  • 20
0
votes
0 answers

Building angular package results in: Cannot find module "jquery/index"

I am developing an Angular module and after compiling and bundling it with ngc and rollup I am getting the following error in my Angular project: Cannot find module "jquery/index" In one of the module files I have the following import: import * as…
Gijs
  • 196
  • 3
  • 9
0
votes
1 answer

How typescript internally handles encapsulation, inheritance and data hiding?

I am curious to explore and understand the typescript to es5 transpilation process. I am pretty clear on the part how typescript uses closures to create scopes and managing inheritance, what still surprises me on the fact that how exactly typescript…
0
votes
1 answer

Typescript code not showing anything in the browser after transpiling

I am trying to write some very simple examples of Typescript code In Atom editor. The example consists of one main.ts and a very small module with only one small class (myclasses.ts) . I import the module normally The transpiling process goes…
0
votes
0 answers

Optimize JavaScript to improve performance

I recently noticed that my code runs significantly slower since I'm using things like .forEach instead of normal for loops etc. I know there are a lot of tools that can for instance minify the source code to reduce file size and tools that simply…
Forivin
  • 14,780
  • 27
  • 106
  • 199
0
votes
0 answers

Babel es2015 transpiler adding _ to variable declaration but not to variable use

I forked a repo of an application that is packaged with webpack. I made a few changes to the index.js and now when I build using webpack, one of my variables in the webpack has a _ in front of it in the declaration, but anytime my code calls that…
Brian
  • 2,702
  • 5
  • 37
  • 71
0
votes
2 answers

Transpiling or not transpiling Polymer 2 applications?

I am writing a Polymer 2 application. The default is to transpile ES6 to ES5 so that you can use ES6 syntax and be sure it will just work. The problem with this is that everybody (even supporting browsers) get to receive transpiled code. Two…
Merc
  • 16,277
  • 18
  • 79
  • 122
0
votes
1 answer

Transpiling es7 to es6 error unexpected identifier

I have transpiled a javascript code from es7 to es6 since I need to use Node.js 6.9.5 but I keep getting this error when transpiling: Unexpected Identifier keyValues[key] = yield DbStorage.get(key); my code looks like this: getMany: function…
user4208442