New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This Plugin is not working with Vite 3.1.0 #27
Comments
+1,Do u know how to fix it? |
+1 |
2 similar comments
+1 |
+1 |
怎么解决啊,我也发现这个问题了
|
@badlym 召唤天降猛男 |
同问,怎么解决啊 |
+1 |
现在解决办法是不用这个插件了,自己写,百度找一个antdesign替换主题的办法. |
作者没时间维护了估计,钱已经赚够了,名气也打响了.还是自己想办法吧 |
+1 |
虽然有这个可能,但是我觉得作者可能生活或者工作上有大变化,还是Respect吧 |
你们哪个大神是不是可以把这个包下载下来优化一下就行了,然后重新发布一个,项目里面再重新引用一下就好了 |
先说一下我的解决方案。讲的不好请多包涵。我使用 pnpm 安装依赖,node_nodules 文件夹下会有.pnpm文件夹。其他安装方式可以打开对应的依赖包操作。 - const colorPluginOutputFileName = __COLOR_PLUGIN_OUTPUT_FILE_NAME__;
+ const colorPluginOutputFileName = '';
- const isProd = __PROD__;
+ const isProd =true;
- const colorPluginOptions = __COLOR_PLUGIN_OPTIONS__;
+ const colorPluginOptions = {} 即可。 问题出现在插件实现的逻辑。核心逻辑是生成好相应的 css 代码片段,然后保存成目标文件。然后通过字符串替换的方式把相应的文本插入到目标文件当中。具体逻辑对应
先在目标文件中声明了一个 |
修改vite.config.ts文件,通过环境变量定义临时解决
|
nice
|
很感谢以上提供的解决方案,目前可以运行了 |
you can try replace Of course, I only use it in vite3, not tested in vite2. enjoy it :) |
good job. |
nice! 👍 |
package.json |
我直接用你的package.json替换,还是不行, |
|
|
"devDependencies": { |
带来次变化的更新为https://github.com/vitejs/vite/pull/9848。 |
亲测可行,具体做法,通过pnpm patch打补丁
会提示一个文件路径,修改提示路径下的dist/index.js 23251行 |
麻烦问一下这个插件在vben v2.10.0支持嘛?有试过嘛? |
支持的哈 |
|
写插件可以赚钱? |
nice bro thx |
This Plugin is not working with Vite 3.1.0. I think it's related to this commit
The text was updated successfully, but these errors were encountered: