GitOfZGT / vite-plugin-theme-preprocessor

css theme preprocessor plugin for vite
MIT License
163 stars 15 forks source link

vite antd-vue 报错 #17

Closed transtone closed 2 years ago

transtone commented 2 years ago
yarn run v1.22.17
$ vite
error when starting dev server:
Error: defaultPrimaryColor can not found.
    at createSetCustomThemeFile (D:\code\hnrr\FE\pc-grid\node_modules\@zougt\some-loader-utils\dist\arbitraryMode\index.js:170:11)
    at D:\code\hnrr\FE\pc-grid\node_modules\@zougt\vite-plugin-theme-preprocessor\dist\common\createSetCustomTheme.js:26:60
    at async Promise.all (index 1)
    at async resolveConfig (D:\code\hnrr\FE\pc-grid\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:68353:5)
    at async createServer (D:\code\hnrr\FE\pc-grid\node_modules\vite\dist\node\chunks\dep-e0fe87f8.js:66702:20)
    at async CAC.<anonymous> (D:\code\hnrr\FE\pc-grid\node_modules\vite\dist\node\cli.js:687:24)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

"@zougt/vite-plugin-theme-preprocessor": "^1.4.0-beta.3"

GitOfZGT commented 2 years ago

ok,fixed in @zougt/vite-plugin-theme-preprocessor v1.4.0-beta.4

GitOfZGT commented 2 years ago

加了新功能,忽略了原来的一个地方,修复咯。

你可以试试新的特性的,文档还未更新,使用方式,可以参考这个demo,https://github.com/GitOfZGT/vite-dynamictheme-antd-vue-demo

transtone commented 2 years ago

ok,fixed in @zougt/vite-plugin-theme-preprocessor v1.4.0-beta

这个版本linux下编译可以,可在windows下又报这个错:

[vite] Internal server error: Preprocessor dependency "less" not found. Did you install it?
transtone commented 2 years ago

https://github.com/GitOfZGT/vite-plugin-theme-preprocessor/issues/16