Questions tagged [es6-module-loader]

ES6 Module Loader Polyfill dynamically loads ES6 modules in browsers and NodeJS with support for loading existing and custom module formats through loader hooks.

Dynamically loads ES6 modules in browsers and NodeJS with support for loading existing and custom module formats through loader hooks.

This project implements dynamic module loading through System exactly to the previous ES6-specified loader API at 2014-08-24 ES6 Specification Draft Rev 27, Section 15. The specification for the module loader was removed from the ES6/ES2015 specification in 2014, and a new loader implementing the new draft WhatWG loader spec is pending alpha release on the 1.0 branch.

For an overview of build workflows, see the production guide.

For an example of a universal module loader based on this polyfill for loading AMD, CommonJS and globals, see SystemJS.

Documentation

294 questions
0
votes
0 answers

Why is ES6 import statement causing AngularJS module not to load?

I'm writing a small app using an ES6 approach to creating an AngularJS 1.x app and have the following code in my app.js class: import {HomeController} from "./controllers/HomeController"; class StatesProvider { //blah, blah working …
atconway
  • 20,624
  • 30
  • 159
  • 229
0
votes
0 answers

Can I use a function to load a module in ES6

When using ES6 module loading syntax, like so... import LoginPage from '../../pages/login'; ... is it possible to use a function to replace ../../pages with a function so that I could have something like this... import LoginPage from…
Jonathon Blok
  • 749
  • 4
  • 14
0
votes
0 answers

Can't export reducer with Babel

This is most likely some typo but I've been trying to fix it for the last hour and came up with nothing. I have a file called app/reducers/index.js: export viewportSize from "./viewportSize"; app/reducers/viewportSize.js is simply: export default…
Gio Polvara
  • 23,416
  • 10
  • 66
  • 62
0
votes
1 answer

ES6 module loader with 'support for progressbar'

I have own module system for internal WEB application - major concept is that application is dynamic, i.e. modules can be added/removed at run-time. Because of this reason I cannot use bundling and separate modules are loaded individually.…
Xtra Coder
  • 3,389
  • 4
  • 40
  • 59
0
votes
1 answer

ES6 export from Syntax on submodule

I have the following structure components/ index.js Messages/ index.js error.jsx info.jsx success.jsx Messages/index.js export the three messages as : export {Info} from './info' export {Error} from './error' export…
FabioCosta
  • 3,069
  • 6
  • 28
  • 50
0
votes
1 answer

Error : React JS can not read the property

I have jsx class and i'm trying to display some contact data which retrive from API call but once i added this.state.contacts.map function it gives me an error, saying TypeError: Cannot read property 'contacts' of null import { Component, PropTypes…
0
votes
1 answer

JavaScript and ReactJs

I have separate js file call api.js and there i define a function FetchDetails = function auth() { return { initialize: function() { var deferredObject = $.Deferred(); var config = { 'client_id': '',my client…
0
votes
1 answer

Can i init an Angular2 hybrid app without SystemJS?

I have a pretty big Angular 1 application. I want to progressively migrate it into Angular 2 so i'm following the the Official Upgrade Guide. Now for some reason i'm getting one problem after the other with SystemJS but i also doubt that the old app…
Bolza
  • 1,904
  • 2
  • 17
  • 42
0
votes
1 answer

Can't import bundled file

I'm doing this in my application System.import('lib/bootstrap.js').then(m => { this.socket = m.io("http://localhost:3000"); }) This is bootstrap.js import io from 'socket.io-client'; export { io }; I created a bundle via jspm bundle…
Hedge
  • 16,142
  • 42
  • 141
  • 246
0
votes
0 answers

How do I correctly resolve es6 modules in a project using jspm's paths config in my mocha test file

We've got a jspm config.js which contains the following settings: baseUrl: "/A_count", paths: { "js/*": "src/js/*.js" } This effectively allows us to use cleaner import statements, instead of having to stub out relative paths. Our directory…
papiro
  • 2,158
  • 1
  • 20
  • 29
0
votes
1 answer

Javascript doesn't recognize typescript require after bundling

Here is my angular module written typescript. /// /// import factory = require('./sharedData'); var sharedData: ng.IModule =…
Aj1
  • 953
  • 2
  • 15
  • 42
0
votes
1 answer

ES6 Module Loader Doesn't Load Angular Controller written using TypeScript

I am trying to convert Javascript angular modules in to TypeScript. Currently I am using ES6 Module Loader. And Trying to convert each module one by one. I did convert one module to TypeScript, but having issues with ES6 loader not loading…
Aj1
  • 953
  • 2
  • 15
  • 42
0
votes
1 answer

Pros and cons of exporting a singleton class from an ES6 module

I currently develop a project based on node.js with Babel. I have a userService.js file that is supposed to be a singleton and manage everything I want with the user and also keep the user's state. Why would I write this module in this way: class…
arisalexis
  • 2,079
  • 2
  • 21
  • 42
0
votes
1 answer

es6-module-loader cannot find module without .js extension

I am porting an application which uses System.import from traceur to Babel. My simplified HTML looks like this:
user663031
0
votes
1 answer

Integrating React to a build flow with module transpilation with Babel

I am currently having trouble with module transpilation with babel. when I am transpiling code to AMD modules with babel, I can make it work in browser by including requirejs library. But when I try to introduce react to this equation we are…
fklt
  • 1
  • 2
1 2 3
19
20