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
1 answer

Angular 1.x, ES5/ES6 and testing with Karma

I have an angular app (with a mix of files ES5 and ES6) that i am developing tests for. The ES6 files I'm transpiling using babel CLI with these options --modules system --module-ids. Let's say I have samething like this: ES5…
dbabaioff
  • 267
  • 2
  • 13
0
votes
1 answer

Initialization order for ES6 imports and angular controllers

Was working on getting an AngularJS application running on ES6. Historically I've used the pattern of allowing the controller files to register themselves with the application, since that way I don't have worry about what controllers, services, etc…
koblas
  • 25,410
  • 6
  • 39
  • 49
0
votes
0 answers

is there any way to obtain a reference to (and use) an es6/2015 import in the same expression?

in node (common-js), i can do something similar to the following: resultA = require('objectA').key1; // resultB = require('functionB')(42); // resultC = require('functionC')(); with es6/2015 modules, i'm currently using something similar to…
tony_k
  • 1,983
  • 2
  • 20
  • 27
0
votes
2 answers

Dynamic ES6 module scopes

All current module loaders like AMD,CommonJS,SystemJS using variable definitions for loading external objects into current module scope like: var something = require('something'); or: define('module',['something'],function(something){}); In…
-1
votes
2 answers

Is it possible to run ES6 code in Babel without transpiling it to ES5

How would I run or execute a code in ES6 using the Babel engine or module in Node Js, without trans-piling it to ES5.
-1
votes
2 answers

Scope with ES6 classes and module system

I'm having a problem due to scope/hoisting/load order. In the following the Auth0Lock is defined inside the if block on line 6, but not immediately outside of it, or within the class. Does anyone know why?? import { EventEmitter } from…
user1775718
  • 1,499
  • 2
  • 19
  • 32
-1
votes
2 answers

Why do I need to wrap some importings with figure brackets {} in ES6?

I found a strange situation in ES6. For example, I'm using npm packages react and react-router. I want to import them to the file: import React from "react"; import { browserHistory } from "react-router"; The strange situation is that I need to…
Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
-2
votes
1 answer

Conditional "test harness" code for my NPM package?

I'm writing this app using React and I was trying to package it up in NPM to use it in a different project. I have as my index.js entrypoint something like this: import { MyReactComponent } from './mypackage'; export { MyReactComponent } // for 3rd…
-3
votes
2 answers

why babel loader and jsx loader is not working in webpack version 3.x in react app

Package.json this is my package json file. I have already install npm install --save-dev babel-loader babel-core in my app /* Package.json*/ { "name": "tripdetail", "version": "1.0.0", "main": "index.js", "scripts": { …
Devendra
  • 19
  • 1
  • 1
  • 7
1 2 3
19
20