Skip to content Skip to sidebar Skip to footer
Showing posts with the label Babeljs

Webpack Is Not Finding My Imports Or Converting My Es6 Code

I'm new to webpack and trying to set up for my client side project. I have created a repo over … Read more Webpack Is Not Finding My Imports Or Converting My Es6 Code

Keep Babel Class As `this` When Using A Member Function In `settimeout`

I have an ES2015 class, call it Foo, which has at least two member functions, bar and baz. In bar t… Read more Keep Babel Class As `this` When Using A Member Function In `settimeout`

Upgrading From Babel 5.8.35 To 6.0.0 Will Not Compile App.js With A Syntaxerror And Unexpected Token

I am in the process of upgrading all my ReactJS components with webpack. In the process I have not … Read more Upgrading From Babel 5.8.35 To 6.0.0 Will Not Compile App.js With A Syntaxerror And Unexpected Token

Tracing Errors Using Karma + Babel + Webpack With Bundles

Using karma + babel + webpack to run ES6 unit tests. I use a webpack bundle to locate and transpile… Read more Tracing Errors Using Karma + Babel + Webpack With Bundles

How To Test Code Setup With Babel Configuration(for Library) Using Jasmine?

Good day to all, I am struggling from quite a few days and raised few questions here here and I hav… Read more How To Test Code Setup With Babel Configuration(for Library) Using Jasmine?

Jest Typeerror: Path Must Be A String. Received Undefined

Below settings for my package.json If I run from command line npm test all jest test cases are exec… Read more Jest Typeerror: Path Must Be A String. Received Undefined

Es6 Calling Super() Doesn't Properly Initialize Parent Class

I have the following code structure, I try to initialize parent class by calling super(), but when … Read more Es6 Calling Super() Doesn't Properly Initialize Parent Class

How To Export Global Variable From Browserify/babelify To Be Used In Project Without Browserify?

Scenario: I have 2 projects with quite different setup: Regular website, legacy code with simple g… Read more How To Export Global Variable From Browserify/babelify To Be Used In Project Without Browserify?

Passing Id With Onclick Function React

I am having problem with passing id to handleClick function and console.log'ing it into the con… Read more Passing Id With Onclick Function React

React Native: Can't Find Variable: Require

I am trying to modify a react native boilerplate so that I can be run on Android platform. I instal… Read more React Native: Can't Find Variable: Require

Babel Js -- Simply Convert Javascript String To Es5 (using Nodejs)

I've been googling a lot and found a lot of half-answers or answers that don't address my q… Read more Babel Js -- Simply Convert Javascript String To Es5 (using Nodejs)

Sinon.js Stub A Function That Resolves A Promise

I want to use Sinon to stub a function that uses callbacks which resolve a promise: const callback … Read more Sinon.js Stub A Function That Resolves A Promise

Webpack Imported Module Is Not A Constructor

I created a small JS module which I intend to make an npm package, but for now is just on GitHub. T… Read more Webpack Imported Module Is Not A Constructor

Exporting A Default & Declaring Anon Function All In One

Here's an example of something I want to do and currently throws an error. I'm not sure I u… Read more Exporting A Default & Declaring Anon Function All In One

How To Import A Jquery Plugin Into A Babel App

So I have a modern javascript app build using ES6 modules and transpiled by babel. In this app, I … Read more How To Import A Jquery Plugin Into A Babel App

How To Create Ie11 Bundles With Webpack 5 And Babel 7

How can we compile modern JavaScript into backwards-compatible JavaScript bundles that can be used … Read more How To Create Ie11 Bundles With Webpack 5 And Babel 7

Mocha Only Running One Test File

My Mocha tests were working fine, but when I added a new module (and test), mocha stopped running a… Read more Mocha Only Running One Test File

Get Access To The Class Static Properties Using Babeljs 6

Below is the minimal app which demonstrate the issue: 'use strict'; var _ = require('u… Read more Get Access To The Class Static Properties Using Babeljs 6

React Native Jest Syntaxerror: Duplicate __self Prop Found

Still haven't gotten a successful run of this to pass with a fairly boilerplate Expo app built … Read more React Native Jest Syntaxerror: Duplicate __self Prop Found

Is There A Way To Setup Webpack Config To Load Specific Core-js Entries

DISCLAIMER: I'm not terribly familiar with webpack or babel outside of simple setup, so if the … Read more Is There A Way To Setup Webpack Config To Load Specific Core-js Entries