javascript - There is a js library that I want to use, but npm does not provide it. The original method was to download the file script reference. Now I want to use import to reference it but it is wrong. Please give me some advice.
滿天的星座
2017-06-12 09:29:25
Looking at the code of that library, it should be an IIFE, and then the variables are exposed to the window. There is no export, so I can't import it. How can I import this file? I don't want to use script references in html.
I’m afraid I have to change it myself, open IIFE, and directly export the attributes originally added to windows...
import ** from *** (path)