Why simple javascript import is not working?

Here not working https://plnkr.co/edit/a7H1ilzkUA3918vc?open=lib%2Fscript.js&deferRun=1 But here in similar example – works, from which I am trying to do: https://plnkr.co/edit/XLSL581pjgwe3PI1?…

Javascript – Where are ‘import’ and ‘export’ statements legal?

I’m studying the new import, export feature in Javascript but was wondering, where in code will these statements be syntactically legal? I understand something like the following won’t be legal: (function(){ import thing from ‘./thing.js’; })(); but does this mean import is only legal at the top of the module script? Or in the global scope? E.g., what about this: import a from ‘./a.js’; (function(){ // … do something with a … })(); import b from ‘./b.js’; // … Also, does this limitation apply to export? E.g., will the following be legal? (function(){ function internalFunc() { // … } export

ES6 modules in Chrome

I’m trying to use ES6 modules in Chrome. From all the examples I’ve looked at the following seems to be the right way to do it, but when I run it in Chrome’s developer tools I get this error message…..

Uncaught SyntaxError: Unexpected token import in reactjs app

I have a react app and Im trying to create a dynamic form using react-jsonschema-form, I have the below index.js file import React, { Component } from “react”; import { render } from “…