Missing styles when using vite build.
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript, vite
- 领域
- build-system, frontend
调研方向
首先,使用列出的 @uiw/react-codemirror、CodeMirror、theme 和 Vite 软件包版本复现报告,并使用所示的 imports 运行 vite build。将构建输出与预期的 CodeMirror 和 theme 样式进行比较;完成的标准是生成的 distribution 包含这些样式,或记录一个可正常工作的 import workaround。
由索引模型根据 Issue 内容生成。
描述
When trying to build my app with vite build. The generated code won't include the styles of codemirror or any themes. It looks like in a previous version (5). There was the .css file on the dist folder of the module that devs could import directly but now there is no such file and vite is having difficulties bundling the styles.
here is how im importing the editor:
import CodeMirror, { EditorView, basicSetup } from '@uiw/react-codemirror';
import { sql } from '@codemirror/lang-sql';
import { vscodeLight, vscodeLightInit } from '@uiw/codemirror-theme-vscode';
import { autocompletion, Completion, CompletionContext } from '@codemirror/autocomplete';
import { useEffect, useState } from 'react';
import { TableData } from '../../utils/utils';
import React from 'react';
import { LanguageSupport } from '@codemirror/language';
the version of the pacakges:
"@codemirror/lang-sql": "^6.8.0",
"@uiw/codemirror-theme-eclipse": "^4.23.6",
"@uiw/codemirror-theme-vscode": "^4.23.6",
"@uiw/react-codemirror": "^4.23.6",
"codemirror": "^6.0.1",
"vite": "^5.4.0"
Is there a work around this, so I can run the build and include the styles?
Thanks for the help in advance
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 162
- 平均合并
- 2 小时 41 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
uiwjs/react-codemirror 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
uiwjs/react-codemirror#766 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
uiwjs/react-codemirror#765 ·
-
难度 3/5 1-2 天 新手友好度 35/100
uiwjs/react-codemirror#772 ·
-
难度 4/5 3-5 天 新手友好度 48/100
uiwjs/react-codemirror#770 ·
-
难度 3/5 1-2 天 新手友好度 48/100
uiwjs/react-codemirror#767 · 2 条评论 ·
查看 uiwjs/react-codemirror 的全部 Issue
相似的 Issue
-
bug priority:low ready-for-dev
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/data-liberation-agent#685 ·
维护者通常 1 天内回复
-
Business
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
txn2/mcp-data-platform#2063 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 77/100
Crosstalk-Solutions/project-nomad#1427 ·
维护者通常 2 天内回复