6,914 questions
1
vote
1
answer
29
views
Installing the TailwindCSS Vite plugin with Vite 8 - peer vite@"^5.2.0 || ^6 || ^7" from @tailwindcss/[email protected]
I'm following the Vite plugin documentation, but I'm running into an error because of the new Vite 8.
I'm creating a new project generated with the new 8.x beta version, then running it:
npm install ...
2
votes
1
answer
39
views
TailwindCSS styles are not being applied in Storybook within a Turborepo
Problem:
I have a Turborepo with a /package that contains my React components (UI library). In the /apps folder, I have my Storybook setup. Storybook itself works correctly and loads the stories as ...
3
votes
1
answer
47
views
Pixi.js project has two canvases on reload
I'm working on a geometry dash clone with pixi.js and Vite. Everything is working smoothly, except for one development issue. When I run npm run dev, the game starts up correctly. However, when I ...
3
votes
0
answers
134
views
Embedded static build in iframe (Electron Forge + Vite)
In principle, all I'm looking to accomplish is embed a static build of a web app into an electron powered vite app.
Context
== File Structure ==
- public/
| - static_build/
| - index.html
| - ...
...
2
votes
1
answer
66
views
Electron/Vite hot reload: any "on close" method?
I'm using Electron and Vite package to manage hot-reload on my app.
I'd like to call an event on close, which does some stuff, which works on both user's close and Vite's hot reload (which close the ...
-1
votes
1
answer
81
views
How to scope Tailwind CSS build in a Micro Frontend to prevent CSS bleeding (Host vs. MFE) without Shadow DOM? [closed]
I am building a Micro Frontend (MFE) using React + Vite + Tailwind CSS + Shadcn + (dndKit , sonner). This MFE is being integrated into a legacy Laravel host application.
The project is large (500+ ...
0
votes
1
answer
64
views
Vite + React deployed with Nginx: “Failed to load module script… MIME type text/html” but assets return application/javascript via curl
I deployed a Vite + React app on an Ubuntu VM using Nginx. The site loads, but in the browser console.I get:Failed to load module script: Expected a JavaScript-or-Wasm module script but the server ...
1
vote
1
answer
92
views
How to make Vite include CSS import statements in the built JavaScript file for a library
I'm building a TypeScript library with Vite that uses SCSS modules. I want the final built .js file to contain actual import "./style.css" statements at the top, so that when users import my ...
Tooling
1
vote
6
replies
56
views
Large build size for Electron app using vite and electron-builder due to node_modules
I have an Electron app that I build using webpack + electron-forge. I consider to migrate to vite + electron-builder. The migration succeeded quite smoothly, and dev experience with vite is way better ...
1
vote
1
answer
43
views
ViteJS - Returning a promise in a field of a React Hook
To migrate from React-Query V3 to V5 (Tanstack/React-Query), I have to change my usage of the lib because of one breaking change: undefined isn't an allowed return value for queryFn anymore. That's ...
-4
votes
0
answers
48
views
Simple-peer works fine when running locally but failing on localhost [duplicate]
I am trying to use simple-peer in a Vite project. When I run locally the first usage example in official simple-peer GitHub README.md file it works fine but when I run it using Vite server, I get this ...
1
vote
0
answers
104
views
How to decrease memory use during vite/pnpm build?
I am running a build for a large project using pnpm and Vite, but it keeps failing with out of memory errors.
I have already tried increasing the Node memory limit significantly (to ~12GB), but it ...
0
votes
0
answers
51
views
Disable tree-shaking for specific entry points in Vite/Rollup
How can I disable tree-shaking for specific entry points or chunks in Vite/Rollup? To be clear, I want to keep tree-shaking enabled for most entry points, just not for specific ones identifiable by ...
1
vote
1
answer
48
views
Building a Vue3 component library: Components lose template-reactivity in Consumer-project
Context
I am creating a library of vue3 components and I am testing the build output in another consumer-project.
The specific vue3-component takes data from a service-callback and is not updated ...
2
votes
1
answer
77
views
Vite build tool will not recognize and compile changes to source files unless I restart the Vite server
I am running an Ubuntu VM on a MacBook. The server is Nginx, the framework is Laravel, Vite is the default engine for front end development. I have configured the Vite server and it starts up, '...