Skip to content Skip to sidebar Skip to footer

Es6 Modules' Path Resolution Failure

I am trying to use the new ES6 features in Chrome 60 (by enabling Experimental Web Platform). This is the structure of my project: myproject ├── src | ├── mymodule.js

Solution 1:

As you can see in the log, the relative path is resolved correctly, the folder is the expected one. The problem is that your files are called dep1.js not dep1 (etc). Add the file extension:

import * as dep1 from"./dep1.js";
import * as dep2 from"./dep2.js";
import * as dep3 from"./dep3.js";

Alternatively you can configure your server to resolve these automatically.

Post a Comment for "Es6 Modules' Path Resolution Failure"