Skip to content

Tag: vite

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 .b…

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 t…

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 s…

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 envi…

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 …