vite-plugin-theme icon indicating copy to clipboard operation
vite-plugin-theme copied to clipboard

示例项目过于复杂,有没有简单的hello-world

Open xxholly32 opened this issue 4 years ago • 4 comments

【背景】

我简单搭建了一个hello-world,尝试页面调用

import { replaceStyleVariables } from 'vite-plugin-theme/es/client';
 await replaceStyleVariables({
    colorVariables: ["#ccccc"],
  });

报错误

Uncaught ReferenceError: __COLOR_PLUGIN_OUTPUT_FILE_NAME__ is not defined

xxholly32 avatar May 11 '21 06:05 xxholly32

嗯可以了,我设置 colorVariables 为空数组了

xxholly32 avatar May 12 '21 03:05 xxholly32

我自己做了一个 demo,比较简单基于 vitesse 和 vite-plugin-theme 做的,可能会比较好理解一些,暂时只支持 dev模式

xxholly32 avatar May 14 '21 03:05 xxholly32

+1,实例项目太大太复杂,基本没法参考

Nakus0426 avatar Aug 31 '21 08:08 Nakus0426

看看这个能否做到您的需求 @zougt/vite-plugin-theme-preprocessor

GitOfZGT avatar Dec 06 '21 03:12 GitOfZGT