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...
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 '....
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...
I have Codepen code that I'm trying to replicate on an web page using just three files, index.html, main.js, and style.css. I tried loading these scripts on the head tag of HTML file.  <script src="https://npmcdn.com/babel-transform-in-bro...
I use the require hook of BabelJS (formerly named 6to5) to run node apps with es6features:  // run.js require("babel/register"); require("./app.js6");   I call node run.js to run my app.js6. I need to install BabelJS and provide a run...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.