Any idea why gulp-uglify will not minimize my ES6 javascript?

This isn't a priority at all, but this has been bugging me for a while. I hate to even post it on here because I'm completely confused, but maybe someone else will understand it. A few things to note before I get into the spiel: This is from a Udemy

Async Brainstorming Function - Babel

Hey this is more of brainstorming help I think, so sorry if it offends the rules. Just not sure where to ask this. Backstory I'm working with React, and using Babel to transpile ES6/7. What I'm trying to do is have a component (another class) call a

The variable does not add in React

I want to do so when I click the button the variable 'balance' grows up by 1 and displays after the 'Balance: ' word. My code compiles, but displayed variable is at 0 even if I click my button. import React, { Component } from "react"; export de

babel, webpack with nodemon script?

I was wondering if there is a way to configure webpack with babel and nodemon. I I pretty much searched the web but found nothing helpful or it may be me because i am pretty much new to build tools. I have this script in my package.json: "start"

Destructive assignment to build a new object - is it possible?

This question already has an answer here: Is it possible to destructure an object and generate a new object in a single statement? [duplicate] 2 answers Is it possible to use destructuring assignment syntax to make it possible to extract data objects

React JS does not work in some browsers

See Update 2 below for what the real problem seems to be. I am having trouble getting a React JS to work in some browsers. In Chrome it worked perfectly. In Firefox 47.0.1 I got this error: SyntaxError: missing } after property list In IE 11 I get th

Why does React require Babel and Webpack to work?

I was looking at the wiki page of vue.js and saw this: When compared to React development, Vue can be integrated to an existing web application much more easily. Normally, a web application can start using Vue immediately by simply including the Vue.

Not able to sweat jsx to js using babel

I am learning react and here is my simple project sturcture: my_project --node_modules --index.js --index.html --package.json --.babelrc index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8">

Unit test generators with `return` and` yield`

Given this function function* backflip(query) { return yield 123; } And this test describe('backflip', () => it('should do that ^', () => let handlerInstance = handler(); expect(handlerInstance.next().value).to.equal(123); expect(handlerInstance.nex

Determining locale with Babel and webapp2

I've recently added Babel to my GAE/webapp2 site, and it works, but I'm confused about the proper way to get the locale. In this answer, he gets the locale with self.request.get('locale', 'es_ES') but this only seems to work if something like ?locale

Babel-polyfill and & ldquo; finally & rdquo; support

How to enable finally method support if i'm using babel-polyfill in my project build on React-Redux stackThe ES6 standard does not support the finally phase of a promise, as T.J. Crowder mentioned in the comments to your question. If you want that ki

Chrome: `fetch` takes too much time

Update: I changed the API from fetch to XMLHttpRequest and I still see the problem. According to the console logs the delay is between "readyState 1"(i.e. OPENED) and "readyState 2"(i.e HEADERS_RECEIVED). Also, maybe it is worth mentio

Manage comments in code when i'm doing i18n

I'm in the process of translating a Open Source project from Chinese to English, and I've used i18n (in this case babel) to separate the code from both English and Chinese translations. Everything's done, except for a rather large number of inline co

Static propsypes do not work on ES6

I want to add some rules for props: import React, { Component } from 'react' export default class App extends Component { static propTypes = { name: React.PropTypes.string.isRequired }; render() { return( ) } } But I got this an error: Warning: Faile

Can not run global babel-node in es2015 mode

so when I install these packages locally they work, but when installed globally (and removed them locally) npm i babel-cli -g npm i -g babel-preset-es2015 npm i -g babel-preset-es2015-node seems like that flag isn't setting es2016-node to look in the

Use babel to turn the ES6 manuscript into gulp

I wanted to use babel to transform the ES6 output from typescript and used this syntax: var gulpBabel = require('gulp-babel'); var ts = require('gulp-typescript'); // ... function compileTypescript(fileSpec, folder) { var options = {jsx: 'react', mod

Using Flask-Babel with virtualenv fails

I have Flask, Babel and Flask-Babel installed in the global packages. When running python and I type this, no error >>> from flaskext.babel import Babel >>> With a virtual environment, starting python and typing the same command I see &g

Python Unit test with i18 but without webapp2

I encountered a problem with unit tests when use i18 in my project. My project uses framewoks i18 and webapp2 The function uses the translation by i18. But when I test, I get the error - missing global variable request. For example it is: from unitte

Internationalize a Python 2.6 application via Babel

We're evaluating Babel 0.9.5 [1] under Windows for use with Python 2.6 and have the following questions that we we've been unable to answer through reading the documentation or googling. 1) I would like to use an _ like abbreviation for ungettext. Is