MMF-FE / vite-plugin-cdn-import

Import modules from CDN with vite plugin
MIT License
208 stars 30 forks source link

请问这种格式的怎么cdn啊 #45

Closed 360060316 closed 5 months ago

360060316 commented 5 months ago

import { basicSetup } from 'codemirror' import { EditorView } from "@codemirror/view" import { javascript } from '@codemirror/lang-javascript' import { json } from '@codemirror/lang-json' import { oneDark } from '@codemirror/theme-one-dark'

Allenice commented 5 months ago

使用 alias, 具体看 cdn 上这个包的链接,可以参考 react-dom 的配置 :https://github.com/MMF-FE/vite-plugin-cdn-import/blob/master/src/autoComplete.ts#L25

ChrisNi888 commented 3 months ago

没看懂,应该怎么写呢。比如这样引入的: import { Editor, Toolbar } from '@wangeditor/editor-for-vue'