What is the difference between import and import {} from of es?

  node.js, question

Recently, when studying meteor’s Demo, it was found that the document inside import uses two kinds of Import.


Then I found it useful when I was doing the collection.
clipboard.pngWhen this is imported
Items in this file are useless at all, indicating that Items are not defined.
Then think for half a day with
clipboard.pngSuch a quotation was a success.

Is it because export must correspond to import {} from “?
When should import “”be used?
How should the two be used best? And report or something?
Most of the documents found on the internet tell you that they are imported without further information. I hope the great god can give me some advice!

You have already said this question in Ruan Yifeng’s es6 introduction.

http://es6.ruanyifeng.com/#do …Command

The import statement executes the loaded module, so it can be written as follows.

import 'lodash';

The above code only executes the lodash module, but does not enter any value.