My webpack compilate is not transpiled into the right JS. It writes exports default MultiLanguage instead of module.exports = { MultiLanguage: MultiLanguage}; My .bablerc { "presets": ["es2015", "stage-0"], "plugins"
I need the CSS that is provided to styled-components to be output to a physical CSS file inside of my public/css directory. export const MyComp = styled.div` width: 100%; height: 500px; ` Along with styles from all other styled-components, the above
I use the "gulp-babel" before uglifying my js files. The module blocks the minification because a third party js script is not "strict mode" compilant. // Include gulp var gulp = require('gulp'); var baseDir = "./"; var jsour
I am just starting to dabble in react and one of the first components I want is something to use photoswipe.js. (react photoswipe) It looks like there is a pretty decent one on npm, but I am running into a problem. When I run my storybook to start te
I'm trying to figure out how to perform dynamic import of classes in ES6 one the server side (node.js with Babel). I would like to have some functionalities similar to what reflection offers in Java. The idea is to import all the classes in a specifi
Functions that were polyfilled with core-js (for example, babel-polyfill) appear as native. Promise.race.toString() produces: function race() { [native code] } So does Object.values.toString(). While they are certainly not browser's native implementa
Given the following snippet I am getting the error below... how should I can fix it? This type is incompatible with the expected return type of number enum. type Size = 1 | 2 | 3; const GetSize = (): Size => { const result: number = parseInt(Math.ran
Say I have two private (not available through npm) projects: projectA and projectB, both using Git as repos: ProjectA: Main project Javascript, ES6, JSX, etc.. Uses Webpack for build, minification, etc. Is compiled with Babel Includes Babel compiled
When i declared getDefaultProps function inside Class which is inherit from React.Component this give Error like Below I setup condition in constructor for initialize props its undefined. import React from "react" import ReactDOM from "reac
When I attempted to use webpack to compile my react jsx code, I received the following error: ERROR in ./client/index.js Module parse failed: C:\Users\Gum-Joe\Documents\Projects\bedel/client\index.js Unexpected token (6:11) You may need an appropriat
I'm trying to use webpack-dev-server to have a hot-reload functionality for JS and SCSS files, but it fails to do so. I'm keep getting the same error: [WDS] App updated. Recompiling... [WDS] App hot update... [HMR] Checking for updates on the server.
Was trying to install sudo npm install react-datagrid --save sudo npm install react-datepicker --save Console Output npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer react-
I'm trying to incorporate Babel's transform-runtime to make my code compatible with IE9. But since integrating it, the code won't even run on Chrome. I get the error Uncaught TypeError: $export is not a function on es6.object.define-property.js:3. Wi
I'm trying to get Babel to produce sourcemaps when run from the command line. The Babel docs around sourcemaps seem to be targeted more toward the gulp workflow and I'm not sure how that translates to the command line. I'm compiling my typescript usi
This is how I include my own modules at the moment: import AjaxUtils from 'common/util/AjaxUtils"; This is achieved using the "paths" options of browserify. This is working out perfectly on client side. Now I'm trying to render the same app
When compiling a React and Redux application with Webpack and Babel I get: Uncaught TypeError: Cannot assign to read only property '__esModule' of #<Object> In some older browsers (<= Chrome 1, Android 4, Safari 5). This issue seems to stem from
I am converting an existing react project from es5 to es6. I have babel-preset-react. When I add es6 to myFile.js I get error: Unexpected token while parsing file. Code: var React = require('react'); var Input = require('../common/textInput') var Rev
I would like ask some help because i can't convert my classic jQuery (v2) plugin in ES6 with module and class. In ECMAScript 5, we can attach jQuery plugin into jQuery prototype like this : app.js - jQuery loaded via HTML <script> tag $.fn.myPlugin
I upgraded my project from RN 0.15.0 to 0.16.0 this morning and with that came many errors due to passing to Babel 6. There is one that I don't figure out (I guess its something missing in my .babelrc file) This code worked fine before upgrading : 'u
I am using the Alt library (Flux implementation) with React-Native. I really like the 'alt/utils/decorators' and 'alt/utils/connectToStores' but I cannot use these @decorators because the RN/Babel config doesn't seem to support it. I'm definitely not
This question already has an answer here: Javascript (ES6), export const vs export default 3 answers What is the difference between these import methods? Method 1: import {sum, pi} from "lib/math"; Method 2: import exp, {pi, e} from "lib/ma
I'm trying to get my Browserify/Babelify/Gulp working in my project, but it won't take the spread operator. I got this error from my gulpfile: [SyntaxError: /Users/mboutin2/Desktop/Todo-tutorial/src/reducers/grocery-list-reducers.js: Unexpected token
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. The poin
I'm trying to take React 0.14 for a spin before I upgrade it in my project. However, with a simple "hello world" prototype, Webpack is throwing an error: ERROR in ./~/react/lib/ReactElement.js Module parse failed: /home/dan/Demos/reactiflux/node
I am trying to build my website with ECMAScript 6, and I choose babel to be the compiler. Now if there are two modules modA.js and modB.js as shown below: // modA class A { a: 1 } // modB class B { b: 1 } After compiled, two new files will be generat
I am using es6 modules in my application, and I am encountering a problem when debugging in my chrome inspector. When I do something like the following in my code: import 'widget' from './widget' class SomeClass { componentDidMount(){ debugger; // wi
Even with trampoline/bind, an infinite recursion should hit memory/time higher for every iteration, so how does Babel implement this even when it is not supported currently?Babel tries to rewrite the recursion as a simple loop, you can see that in th
I have a React application with Components written in ES6 - transpiled via Babel and Webpack. In some places I would like to include specific CSS files with specific Components, as suggested in react webpack cookbook However, if in any Component file
I was about to publish a module to NPM, when I thought about rewriting it in ES6, to both future-proof it, and learn ES6. I've used Babel to transpile to ES5, and run tests. But I'm not sure how to proceed: Do I transpile, and publish the resulting /
I'm trying to play with Babel, but it doesn't work well for me. My project is simple |-project/ |---src/ |-----index.html |-----main.js |-----module.js |---Gruntfile.js |---package.json index.html <!DOCTYPE html> <html> <head lang="en&