Skip to content
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

Missing styles when using vite build. #707

Open
jonocr opened this issue Dec 11, 2024 · 0 comments
Open

Missing styles when using vite build. #707

jonocr opened this issue Dec 11, 2024 · 0 comments

Comments

@jonocr
Copy link

jonocr commented Dec 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant