With ES2015 syntax, we have the new import syntax, and I've been trying to figure out how to import everything exported from one file into another, without having it wrapped in an object, ie. available as if they were defined in the same file.  S...
This is what I get when I try to run webpack: the error I get is:     "ERROR in ./v3/app/styles/main.scss   Module parse failed: /Users/vovina/widget-login-react/v3/app/styles/main.scss Unexpected character '@' (1:0)   You may need an app...
I'm not sure what I'm missing here. I'm working on a project using jspm and es6-module-loader. I've got an module defined as follows:  import hooks from './hooks'; import api from './api'; import tools from './tool...
What's the ES6 equivalent for module.exports  I want to get the value of foo from an import statement  module.exports = {     foo: function (a) {     } }   Tried:  export default {     foo: function (a) {     } }   The way first one is imported i...
I use ES6, Babel and webpack stack.  I have installed highcharts by npm (I prefer to use the official highcharts npm repo):  npm install highcharts-release --save   But, regular import (ES6) doesn't work as expected:  import highcharts from '...
Let's say I have a simple class like this in fileA.js:  class foo {     constructor(x) {         this.name = x     }      fooMethod(x) {         return x + 'hello';     } }   And I want to import and use fooMethod in fileB.js like this:...
In ES2015, it's possible to import an entire module as an object whose properties are the module's exports:  import * as name from 'module';   I find this to be extraordinarily useful for namespacing and use it all the time.  It's...
I'm starting a new project in which I'd like to have ES6 style modules, however, I can't get it to run in a browser. I'm using Chrome.  I isolated the issue into very few lines of code.  Here are my 2 TypeScript files:  app.ts  import...
CoffeeScript doesn't support ES6 import yet. (See https://github.com/jashkenas/coffeescript/issues/3162)  I tried to use the following syntax as explained in the link:  `import { createAction, handleAction, handleActions } from 'redux-actions...
I have the following require statements in my .js file which gets transpiled from ES2017, however, the browser still does not recognize these commands (require is not defined). How can I solve this?    this.e = require('../../e.js'),   this.a...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.