Skip to content
Advertisement

Tag: vite

How to generate a static website out of Sveltekit official RealWorld example for hosting on google firebase?

https://realworld.svelte.dev/ is the official example of SvelteKit. https://github.com/sveltejs/realworld is the codebase for this official example. I am trying to generate a static site so I can host this on google firebase. I updated config asĀ  content of file svelte.config.js is Content of file src/routes/+layout.server.js is When I am trying to build using command npm run build I am getting error

Vue3 app on vite can’t compile scss syntax

I can’t use scss nesting syntax. _table.scss table { &.table { width: 100%; } } results in dev tools I imported my _table.scss file into main.scss and main.scss into main.js main.scss main.js Here is my package.json dependencies And my vite.config.js I followed the vite API If I use simple syntax .block .block__item or use scss syntax in vue components –

Vue v-for and variable logic unclear

trying to code a chatPage from a tutorial, the tutorial was releases in vue 2.0 and now i wanna use the new vue 3.0 version. I have a messageContainer which will display the chatMessages. it has the messages as an array and it should loop over them and display each one as a messageItem. Yet, the syntax with the v-for

Why is my component not loading through Vite

I am building a React project with Vite. I was using a tutorial from an article that I found at https://www.digitalocean.com/community/tutorials/how-to-set-up-a-react-project-with-vite. I followed the tutorial as described, however, my “greeting” component will not load. Answer Components should start with capital letter .

How to define custom Express.js route for vite dev server

I am translating my app from webpack configuration into vite. My current webpack dev server has custom endopint configured for doing some stuff. I need to have this same endpoint in vite config as well. How to do this? How can I define an express.js route for vite dev server? This endpoint is for loading environment variables from a service

Failed to load module script: Expected a JavaScript module

I am using vite as build tool for my react app and golang as backend. I built the app for production and host the app on my http server. my directory structure: To host my files the code looks like (inside main.go) in index.html The code did actually send correct files but with wrong headers. Answer So I had to

What is a good file structure to have with Vite? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 9 months ago. Improve this question I am using Vite to easily run tailwind and other npm packages in my vanilla HTML and JavaScript. This is what

Cannot find module ‘react’ when use third party React UI lib – Vite + Preact

I’m facing this issue in this Vite started repository. https://github.com/vicainelli/vite-starter I’m using Vite + Preact + Vitest + Testing Library If I’m testing any code inside the codebase, it works fine, but If the test runs against some component that uses another component from an external library, I’m getting this error. This is something similar to this issue, but I’m

Advertisement