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
0
3
945

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.

滿天的星座
滿天的星座

reply all(3)
大家讲道理

I’m afraid I have to change it myself, open IIFE, and directly export the attributes originally added to windows...

过去多啦不再A梦

import ** from *** (path)

为情所困
如果没有export引js如下
import "./assest/js/autoPageFont.js";
就这样引js,这样就会执行你这样引的js
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template