node.js - node import file problem
ringa_lee
ringa_lee 2017-05-16 13:37:07
0
1
394

Generally speaking, when we introduce a package, we just import Pack from 'pack';
But I saw a lot of packages, there are different versions in the folder, and there are more than one file that needs to be used. It is js, or it may require a css file. In this case, which file should be declared in it?
Or directly:
import Pack from 'pack/dist/...';

ringa_lee
ringa_lee

ringa_lee

reply all(1)
左手右手慢动作

There is a main attribute in package.json that points to the root, usually index.js or the like.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template