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...
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 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...
I've got a project written in ES6 with webpack as my bundler. Most of the transpiling works fine, but when I try to include decorators anywhere, I get this error:   Decorators are not supported yet in 6.x pending proposal update.   I've loo...
I have isomorphic app written in ES6 on client with Babel transpiler. I want my express server to have the same ES6 syntax as client code.   Unfortunately require('babel/register') doesn't work..  server.js  require('babel/register...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.