es6-module-loader Questions
7
EDIT: for more background, also see the discussion on ES Discuss.
I have three modules A, B, and C. A and B import the default export from module C, and module C imports the default from both A ...
Stiltner asked 9/8, 2016 at 3:16
3
Solved
I'm trying to export default modules using index.js barrels but can't seem to get it to work. It works fine with named exports but not default exports.
Simplified Project Structure
/hellos
/comp...
Orogeny asked 22/12, 2016 at 19:18
6
Solved
Is it possible to import javascript module from external url in ES6?
I tried (using babel-node):
import mymodule from 'http://...mysite.../myscript.js';
// Error: Cannot find module 'http://...my...
Rhapsody asked 5/1, 2016 at 8:33
14
Solved
I am trying to use Webpack with Babel to compile ES6 assets, but I am getting the following error message:
You may need an appropriate loader to handle this file type.
| import React from 'react';...
Discriminator asked 2/11, 2015 at 2:40
7
Solved
Using es6 imports, you can do this:
import { MyComponent } from "../path/to/components.js";
export default function () {
return <MyComponent/>;
}
Can I do it with React.lazy too?
const ...
Klemens asked 10/11, 2019 at 18:20
2
Solved
I have an ES6 application (with Babel 6.5 and Webpack) and it successfully imports my modules like this:
import $ from 'jquery';
I wanted to install https://github.com/robflaherty/riveted/blob/m...
Sextans asked 18/4, 2016 at 7:21
11
Solved
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'...
Wolves asked 20/10, 2015 at 15:59
2
Solved
I have two files, file1 exports a variable 'not a constant' var x=1
and file2 which imports this variable from it
the problem is that I canno't modify that imported variable even it is not a const...
Dryden asked 11/12, 2018 at 11:30
4
Solved
I am new to Node js and got some issues. Previously I was using node Js v13.8 to run my express application and it was working very well. I was using es6 syntax and type module having JS extension ...
Rupture asked 1/5, 2020 at 3:38
12
Solved
I use webpack path aliases for ES6 module loading.
E.g. If I define an alias for utils instead of something like
import Foo from "../../../utils/foo", I can do
import Foo from "utils/foo"
The pr...
Unpeopled asked 22/1, 2016 at 9:50
2
Solved
Looking on the Internet I'm confused with the special "index.js" module file.
Using babelJS + Node.js or Browserify/Webpack I can import an "index.js" module inside a "libs...
Outstare asked 11/5, 2016 at 10:13
2
Solved
I've tried searching the internet for the execution order of imported modules. For instance, let's say I have the following code:
import "one"
import "two"
console.log("three");
Where one.js and...
Bristow asked 22/2, 2016 at 10:33
1
I'm using ESM to loading my modules and I use them in this way:
// More info on why this is needed see (https://github.com/mochajs/mocha/issues/3006)
async function wire(){
await import("./Sa...
Casillas asked 15/2, 2019 at 20:44
1
I am using webpack + es6 to build my files. I exported modules in a Math.js, then imported in Main.js.
In the latter, I used the module to compute, then set a stop in the debugger. The former work...
Halfon asked 3/2, 2017 at 3:34
4
Can someone help me understand how different the namespace and module is?
AWS.d.ts
declare module AWS {
...
...
}
export = AWS
helper.d.ts
export declare namespace Helpers{
...
...
}
app...
Wingless asked 25/3, 2017 at 19:22
3
Solved
I'm trying to create a mixin that's globally available, but not automatically injected into every component. i.e. i do NOT want this: Vue.mixin({...});
I set up the project according to these inst...
Detainer asked 8/4, 2016 at 2:34
2
I can't seem to figure out how to get an html5 video to render in a react app from local files. Literally the only way I've been able to get this to work is like this:
<video src="http://www.w3...
Hanuman asked 7/4, 2016 at 1:28
3
React with babel. I have this confusion with imports and module.exports. I assume babel when converting the ES6 code to ES5 converts the imports and exports to require and module.exports respectiv...
Menorca asked 14/12, 2015 at 23:25
5
Solved
I am using vue-loader to construct my *.vue single-file components, but I am having trouble with the process of extending a single-file component from another.
If one component follows the spec to ...
Lavena asked 12/3, 2016 at 22:30
5
Solved
I'm trying to work with TypeScript in my node project, but I have some issues with that.
This is my index.ts file:
import express from 'express';
const app = express();
I'm running:
tsc --module ...
Expose asked 29/12, 2015 at 22:45
1
Solved
While migrating from CommonJS (.cjs) to ES Modules (.mjs), I've faced an issue of importing namespaced CJS to MJS:
import mysqlPromise from "mysql2/promise";
returns an error:
Error [ER...
Pray asked 28/3, 2020 at 16:34
5
Solved
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....
You asked 11/7, 2016 at 13:31
23
Solved
I am having a hard time trying to get the lodash modules imported. I've setup my project using npm+gulp, and keep hitting the same wall. I've tried the regular lodash, but also lodash-es.
The lodas...
Cosby asked 7/1, 2016 at 16:28
1
Solved
While trying to port some of our JS code to use modules, I ran into this peculiar case which I couldn't explain. I was setting up my main JS file to have dynamic imports for my main entry points an...
Decor asked 21/3, 2019 at 6:28
1
I used this es6-module-loader in an Angular 2 project and it worked great for loading TypeScript modules in real time in the web-browser. Now, I am upgrading this project to Angular 6, but here the...
Michelinamicheline asked 15/11, 2018 at 23:10
1 Next >
© 2022 - 2024 — McMap. All rights reserved.