I have this code:  "use strict";  import browserSync from "browser-sync"; import httpProxy from "http-proxy";  let proxy = httpProxy.createProxyServer({});   and I have installed babel-core and babel-cli globally via npm. Th...
I'm trying to use async, await from scratch on Babel 6, but I'm getting regeneratorRuntime is not defined.  .babelrc file  {     "presets": [ "es2015", "stage-0" ] }   package.json file  "devDependencies": {...
In a project I'm collaborating on, we have two choices on which module system we can use:   Importing modules using require, and exporting using module.exports and exports.foo. Importing modules using ES6 import, and exporting using ES6 export...
I'm using Babel for extend my class with the built-in native Array  class NewArray extends Array {   first() {     return this[0];   } }  var a = new NewArray(1, 2, 3); console.log(a.length); // 3 console.log(a); // [ 1, 2, 3 ] console.log(a.fi...
In Babel 5.x, I can write the following code:  app.js  export default function (){}   index.js  require('babel/register'); require('./app')();   Then, I can run node index.js with no errors. However, using Babel 6.x, running the fol...
I'm new to webpack, and I need a hand in setting up to generate sourcemaps. I'm running webpack serve from the command line, which compiles successfully. But I really need sourcemaps. This is my webpack.config.js.  var webpack = require(...
I am currently using ES6 in an React app via webpack/babel. I am using index files to gather all components of a module and export them. Unfortunately, that looks like this:  import Comp1_ from './Comp1.jsx'; import Comp2_ from './Comp2...
I am seeing that the instanceof operator doesn't work on instances of Error subclasses, when running under babel-node version 6.1.18/Node version 5.1.0 on OS X. Why is this? The same code works well in the browser, try my fiddle for an example....
I have a node.js library lib written in ES6 (compiled with Babel) in which I export the following submodules:  "use strict";  import * as _config from './config'; import * as _db from './db'; import * as _storage from '....
Say you have an array-like Javascript ES6 Iterable that you know in advance will be finite in length, what's the best way to convert that to a Javascript Array?  The reason for doing so is that many js libraries such as underscore and lodash on...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.