Cannot use this package in a Remix + Vite app
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript, vite
Research direction
Start with the reproduction at StackBlitz and app/routes/_index.tsx, then inspect react-tweet's dist/twitter-theme/theme.css import and the supplied Vite SSR configuration. Reproduce the Unknown file extension ".css" error and determine what change allows enrichTweet or another exported function to work in a Remix + Vite app without that error.
Written by the indexing model from the issue text.
Description
Problem
When I try to make use of enrichTweet or any function exported from the react-tweet package, I get the following error:
1:08:50 PM [vite] Internal server error: Unknown file extension ".css" for /Users/gonzalostoll/Dev/projects/tweet-archive/node_modules/react-tweet/dist/twitter-theme/theme.css
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:176:9)
at defaultGetFormat (node:internal/modules/esm/get_format:219:36)
at defaultLoad (node:internal/modules/esm/load:133:22)
at async ModuleLoader.load (node:internal/modules/esm/loader:570:7)
at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:445:45)
Reproduction
https://stackblitz.com/edit/remix-run-remix-8g6mfu?file=app%2Froutes%2F_index.tsx
Failed attempts
I have tried to edit my vite config in many ways, all of which were met with failure:
import {vitePlugin as remix} from '@remix-run/dev'
import {defineConfig} from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
export default defineConfig({
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
}),
tsconfigPaths(),
],
ssr: {
noExternal: 'react-tweet',
},
})
import {vitePlugin as remix} from '@remix-run/dev'
import {defineConfig} from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
export default defineConfig({
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
}),
tsconfigPaths(),
],
css: {
modules: {
scopeBehaviour: 'global',
exportGlobals: true,
localsConvention: 'camelCaseOnly',
},
},
})
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 119
- Avg merge
- 6m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel/react-tweet
-
`QuotedTweet.self_thread` is optional in syndication responsesPossibly taken @ocavue claimed this 21 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·
-
AbortError when playing video: "media was removed from the document"Possibly taken @ShobhanKarthish claimed this 36 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vercel/react-tweet#213 ·
-
why entities is not iterable also it shows Cannot read properties of undefined (reading 'indices')Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
vercel/react-tweet#221 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
vercel/react-tweet#212 · 8 comments · 29 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
vercel/react-tweet#208 ·
All issues in vercel/react-tweet
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
cline/mcp-marketplace#2932 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
lingdojo/kana-dojo#32188 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Portkey-AI/gateway#1844 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
rjsf-team/react-jsonschema-form#5495 ·
Maintainers usually reply within 2 days