Category "vite"

Error: Unexpected "<" in vite react in JS files

I am making a react app with vite instead of creat react app. When I use .jsx as suffix, it works fine. But when I use .js, throws hundreds of errors in my file

Vitest defineConfig, 'test' does not exist in type 'UserConfigExport'

Trying to setup vitest on an already existing vite (vue 3, typescript) project. My vite.config.ts looks like this: import { defineConfig } from 'vite'; import v

Slow button response time with Capacitor x Svelte on Ios

I try to create a starter app with Capacitor and Svelte. Everything works fine except one thing, when I use native html anchor ( with svelte-routing) for naviga

Build problem with React viteJS and was amplify

my question is quite simple to explain. I've initialized a React project with ViteJS and then added aws-amplify for the backend. I developed the project and eve

How to load a static content in index.html

I was using vue-cli with webpack for my project and was loading an image in index.html like this // index.html <html> ... <style> .t

How to setup `vite-plugin-pages`, cannot find module `~pages`

I'm trying to set up file system based routing for a Vue 3 application using Vite with the help of vite-plugin-pages. I created the project using yarn create vi

Replacement for require in Vuejs 3 with Vite for image array

I'm currently switching to vite with vuejs and have the following problem: I have a component in debugging that displays images from a folder: imageArray: [

How to include Tailwind CSS styles from React component library into the app CSS bundle?

G'day, I am building a React component library with TailwindCSS and ViteJS. The library outputs each component as a separate JS file, for example: // @component

Vite - empty assets folder (not whole outputDir)

Due to other construction services e.g. from the CMS that is in use also puts files in the same folder as outPutDir I only need to empty the assets folder. At t

Storybook (with Vite / Typescript / MDX) doesn't show ArgsTable

I'm trying to show the table with props on a MDX docs page, but whatever I try, the table only shows: "No inputs found for this component. Read the docs >" I

Sentry get CORS error in localhost by VueJS3

I'm using http://localhost:3000 to development my website, but I always get CROS error from Sentry, what am I missing? in Sentry's Setting: I've set the project

Read a file content as a string in Vue

Some other post respond to the same problem (here, here and here) by using raw-loader but from my understanding it is deprecated for webpack v5 (but I'm not sur

How to config vite HMR port in Nuxt3 config?

I'm using Nuxt3 within a Docker compose setup where port 8001 is the accessible port for the node container running Nuxt3 channeled via an nginx reverse proxy.

Vite-Vue3 can not use web component (full build, runtime compiler)

1、Switch to full vue build in vite.config.js: import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig({ p

vite is not auto reloading index.html on save after tailwind installation as postcss plugin

I have installed Vite with Tailwind. But after installing Tailwind , when I change the index.html file, the Vite server does not auto reload. It reloads when I

How to set multiple output when build lib with vite

When I try to build a lib in vue3, I want to set multiple output file. Code like this: rollupOptions { output: [ { file: 'bundle.js', format:

Can vite package nodejs back-end projects?

Can vite package back-end project such express or koa? How can we pack a back-end nodejs project?

Bundle JS and CSS into single file with Vite

I'm having a devil of a time figuring out how to build a single .js file from Vite in my Svelte project that includes all of the built javascript and CSS from m

Vite - change ouput directory of assets

By default Vite generates files in the source directory under dist. my-app/ ├─ node_modules/ ├─ dist/ │ ├─ assets/ |

Vite - change static assets' directoy

I had build an app using create-react-app. And our server is set up as such that all files except index.html are in a folder named static. <!DOCTYPE html>