es6-module-loader Questions

1

Solved

In ES6 I can export a simple foo constant: export const foo = 1; I can also convert the value of that export (1) to a variable, and export that: const fooValue = 1; export foo = fooValue;...
Arquit asked 26/9, 2016 at 17:45

1

I came across this distinction which wasn't explained well in ExploringJS Qualified and unqualified imports work the same way (they are both indirections) What is the distinction and therefore...
Chenault asked 22/1, 2016 at 18:28

3

I have a project that is just a few months old, and I decided to write it in ES6 to learn the new system. (Which I like a lot). The project is a sophisticated WebGL renderer. Initially I simply u...
Cherise asked 30/8, 2016 at 16:21

2

Solved

I was wondering what is the best practice to import a module's function/class in another module that the module itself needs to invoke/initialize its own function/class before being imported into a...
Unknit asked 16/8, 2016 at 17:15

1

Solved

I have a SPA (in Aurelia / TypeScript but that should not matter) which uses SystemJS. Let's say it runs at http://spa:5000/app. It sometimes loads JavaScript modules like waterservice/external.js...
Chablis asked 4/8, 2016 at 12:3

1

Solved

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) { ...

1

I'm trying to use the dynamic module loading feature in ES6 and it seems that it's not actually implemented yet. But there are substitutes like ES6 Module Loader Polyfill which supposedly should do...
Subternatural asked 13/5, 2016 at 22:47

2

Solved

I am trying to understand named and default exports. I have a seemingly basic requirement which I don't understand how to setup. I want to be able to import both: //app.js import Mod from './my-m...
Plutonic asked 12/4, 2016 at 10:3

1

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 t...
Antipyrine asked 30/3, 2016 at 2:30

0

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"; a...
Johnathanjohnathon asked 25/2, 2016 at 10:10

1

Solved

I'm trying to combine Angular 1.5, UI Router using ES6 import modules syntax with Babel & Webpack. In my app.js I have: 'use strict'; import angular from 'angular'; import uiRouter from 'ang...

1

Solved

Using SystemJS, how do I specify that one library depends on another? For example, the Bootstrap JavaScript library depends on jQuery. Based on the SytemJS docs, I assumed I would specify this depe...
Afterdamp asked 25/1, 2016 at 20:25

2

Solved

I'm getting a bit lost in TS re-exports. Say I create a pair of test modules; test1.ts; export function test1() { return 'test'; } test2.ts; export function test2() { return 'test'; } I be...
Woodham asked 1/1, 2016 at 15:50

1

Solved

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 namespaci...
Tyro asked 26/11, 2015 at 0:20

1

Solved

I use babel.js and have a new module foo in my code foo.js: export function foo(number) { return number + 42; } And bunch of big old files where everything is global. And I need to call a foo ...
Trever asked 11/11, 2015 at 14:10

0

Are there any existing solutions for run-time bundling of ES6 modules? I'm looking to simplify JavaScript code development in a MVC5 web app. We're having issues with large, unwieldy JS files, so I...
Flatcar asked 6/10, 2015 at 13:49

1

Solved

ES6 allows us to use a new import syntax. Using it, we can import modules into our code, or parts of those modules. Examples of usage include: // Import the default export from a module. import Rea...
Levasseur asked 25/9, 2015 at 2:35

2

Solved

Sorry if question is too simple, but I'm missing something here. Just switched an ES5 module that looked like: module.exports = { func1: function(a, b) {...}, func2: function(a, b) {...} }; To...
Acantho asked 1/8, 2015 at 20:5

1

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 u...
Colossae asked 28/7, 2015 at 19:9

1

Solved

Is anybody able to explain the difference between a simple import and a System.import statement of the ES6 Module Loader (or Polyfills like System.js, Webpack etc.) Something like System.import(...

© 2022 - 2024 — McMap. All rights reserved.