Top "Es6-modules" questions

The standard module system for JavaScript, introduced in ECMAScript 6 (2015).

babel-jest doesn't handle ES6 within modules

I am trying to set up Jest on a React based project which uses ES6 modules. However I seem to …

babeljs jestjs es6-modules
What’s the purpose of the HTML “nomodule” attribute for script elements if the default is text/javascript?

I am not clearly understanding why the nomodule attribute exists in the new browsers that support ES6 modules. In HTML 5, …

javascript html ecmascript-6 es6-modules
How to use ES6 import/export with Webpack 4?

I'm trying to get a basic ES6 import/export working with Webpack 4, and Webpack can't seem to resolve my module, …

webpack es6-modules webpack-4
ES6 Modules: Undefined onclick function after import

I am testing ES6 Modules and want to let the user access some imported functions using onclick: test.html: <!…

javascript ecmascript-6 es6-modules
Can I use ES6 modules in Node.js 8?

Can I use ES6 module syntax with Node.js starting from version 8? Similar questions have already been asked on this …

javascript node.js ecmascript-6 es6-modules
ES6: "import * as alias" vs "import alias"

Is there any difference between: import utils from 'utils' and import * as utils from 'utils'? In case A: //utils.js …

javascript ecmascript-6 es6-modules
how to reset module imported between tests

let's say I have a module that needs to be initialized once in the start of the app (to pass …

javascript jestjs es6-modules
How to extend JQuery functions in TypeScript

I'm rewriting some JS code on TypeScript and encounter with problems with module import. For example, I want to write …

jquery typescript interface es6-modules
Chrome 61: Unexpected token import

Running Chrome 61 which is supposed to support module loading with import. Indeed Paul's demo works for me. However, when I …

javascript google-chrome es6-modules
Using the dynamic import() function on Node.js

I'm trying to implement basic functionality of a dynamic import inside a Node v10 environment. main.js async function main() { …

javascript node.js babeljs es6-modules dynamic-import