vite-plugin-cdn-import icon indicating copy to clipboard operation
vite-plugin-cdn-import copied to clipboard

TypeError: importToCDN is not a function

Open Mt-Youya opened this issue 1 year ago • 6 comments

@MMF-FE [email protected] TypeError: importToCDN is not a function

importToCDN必须.default 才能用 1698203246014 不用 default 用不了 1698203291440

Mt-Youya avatar Oct 25 '23 03:10 Mt-Youya

import { Plugin as importToCDN } from "vite-plugin-cdn-import"; 这样引用试试

GuaiJieYo avatar Oct 28 '23 13:10 GuaiJieYo

Why not try vite-plugin-cdn2?. This repository seems to be no longer maintained so I made a new plugin vite-plugin-cdn2

nonzzz avatar Oct 30 '23 10:10 nonzzz

import { Plugin as importToCDN } from "vite-plugin-cdn-import"; 这样引用试试

It works!

Mt-Youya avatar Oct 31 '23 13:10 Mt-Youya

Why not try vite-plugin-cdn2?. This repository seems to be no longer maintained so I made a new plugin vite-plugin-cdn2

I wanna use Cloudflare CDN, could you add it in your url.js? Cloudflare CDN libs

@nonzzz

Mt-Youya avatar Oct 31 '23 13:10 Mt-Youya

@Mt-Youya You only need to fill in the corresponding cdn address. If you are not satisfied, you can use resolver

nonzzz avatar Oct 31 '23 13:10 nonzzz

Why not try vite-plugin-cdn2?. This repository seems to be no longer maintained so I made a new plugin vite-plugin-cdn2

因为vite-plugin-cdn2文档不完善,能自动导入哪些,有哪些配置想,每个配置项什么意思需要看源码才能看见呀,而且我试了您的插件,并未生效

fxzer avatar Apr 07 '24 04:04 fxzer

Fixed in 1.x

Allenice avatar Apr 26 '24 02:04 Allenice