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

How to create an instance of an imported class in another class

User.js class User { constructor() { this.fisrtName this.lastName } get fullName() { `${this.firtName} ${this.lastName}` } } export default User Test.js import React from 'react' import {User} from './User' class Test…
Nigiri
  • 3,469
  • 6
  • 29
  • 52
4
votes
1 answer

Is there any way to use es6 import and export features with grunt without using webpack

I want to use es6 import and export featues with grunt setup, but i don't want to use webpack to use import and export, so Is there any way to use es6 import and export with grunt without using webpack ??? My grunt-babel definition is: babel:…
coder
  • 1,874
  • 2
  • 22
  • 31
4
votes
3 answers

TypeScript inheritance and circular dependencies in SystemJS

I'm using TypeScript with --module system (SystemJS) in a very large project. SystemJS supports cyclic dependencies, and most of the time it works fine. However, when TypeScript inheritance gets involved, things begin to break. For example, if a…
4
votes
1 answer

Import a cert file as a string using webpack

I was really hoping I'd be able to use webpack to load a certificate file containing text using the raw-loader. Unfortunately it fails at the -'s in the first line: -----BEGIN CERTIFICATE-----. As a test I removed the first -----, and then it fails…
4
votes
1 answer

Webstorm Unexpected Token export

I am having an "Unexpected token export" issue in Webstorm that has not been solved by the other StackOverflow posts. Essentially I am trying to use the import/export module functionality with the package.json and bar.js code below. I am using…
jdscolam
  • 988
  • 8
  • 20
4
votes
1 answer

ES6 module's "import" officially compatible with CommonJS and AMD?

From this article : https://hacks.mozilla.org/2015/08/es6-in-depth-modules/ It is written that The new standard is designed to interoperate with existing CommonJS and AMD modules. And more precisely All CommonJS and AMD modules are presented to…
Jecimi
  • 4,113
  • 7
  • 31
  • 40
4
votes
0 answers

How to use Traceur with nested directory structure?

I want to use ES6 for my next project and I'm using Traceur as transpiler for the purpose. I got it working the way described in the Getting Started guide. However I would like to compile all my source files into single minified file in a way they…
Jayesh
  • 51,787
  • 22
  • 76
  • 99
4
votes
2 answers

How to troubleshoot es6 module dependencies?

I am developing a React & Reflux app, which is bundled by webpack with babel-loader (v6), and I am experiencing es6 modules dependencies issues For example, I have a component that use the reflux .connect() mixin : import MyStore from…
Pandaiolo
  • 11,165
  • 5
  • 38
  • 70
4
votes
1 answer

JS - meaning of @ in import '@foo/bar'

While reading this article earlier, I came across the following line of code: import { run } from '@cycle/core'; Which led me to the following questions: What is the significance of the @ symbol, if any? Is there a difference between import…
Darragh Enright
  • 13,676
  • 7
  • 41
  • 48
4
votes
1 answer

Typescript blocks node/module factory pattern: error TS4060

When using ES6 module syntax to export a factory function which returns an instance of a class Typescript produce the following error: error TS4060: Return type of exported function has or is using private name 'Paths'. From paths.ts: //Class…
Michael Price
  • 151
  • 2
  • 7
4
votes
0 answers

How to shim a Bootstrap Plugin installed with jspm / system.js needing global jQuery

I have a ES6 Setup working with jspm and system.js with a additonal registered endpoint for bower. I need that endpoint due to the fact that installing Boostrap via npm or github does not provide the necessary less files for Bootstrap…
3
votes
2 answers

How to determine the order of css in my create react app build with webpack and customize-cra?

I am trying to change how to keep the same order of my css in development as I do in my build for my app using Create React App. When I am running my app in development mode the css loads like this: