by msoad · 11y ago · 0 comments
I hope it works like this
import {readFile} from 'fs';
import {clone} from 'lodash';
rather than explicitly providing "correct" URL to the modules.EDIT: edited the syntax.
import { readFile, writeFile } from 'fs';
import { clone } from 'lodash';Section 15.2.1.16 of the current stable ES6 specification specifies how the import syntax is resolved, and it doesn't use destructuring.
P.S. Sorry too lazy to get a clickable link from the spec :P see http://awal.js.org/especser/#15.2.1.16 if you really wanna read it
import clone from 'lodash/lang/clone'