code-farmer-i / vite-plugin-prismjs

9 stars 0 forks source link

vite-plugin-prismjs Error #2

Open zqq-nuli opened 1 year ago

zqq-nuli commented 1 year ago
import prismjsPlugin from "vite-plugin-prismjs";

I will report an error when importing vite in this way prismjsPlugin is not a function

import { prismjsPlugin } from "vite-plugin-prismjs";

I only need to import in this way to function properly. It seems that both import methods are supported in the declaration file

我通过第一种导入方式报错 prismjsPlugin不是一个函数 只有通过第二种方式才是正常的,我看声明文件中似乎都是支持的

zqq-nuli commented 1 year ago

languages: 'all', My settings for importing all seem to have not taken effect

我设置全部导入 似乎并没有生效

zqq-nuli commented 1 year ago

Does it only take effect when it is packaged and compiled, and it doesn't take effect when I dynamically import it

AlphaNight001 commented 6 months ago

感谢兄弟,问题解决了,非常完美