Category "vite"

Ignore coverage HTML files from Vite + React HMR

I have a project set up using vite with the @vitejs/plugin-react extension. I'm using the basic config of export default defineConfig({ plugins: [react({ incl

Vue 3 - emit is not a function

I'm having a strange problem using emit in Vue 3 Composition API + Vite. I want to make a simple emit from a child component to a parent. The code of the child:

Vite does not build tailwind based on config

I created a new react-ts app using yarn create @vitejs/app my-app --template react-ts. I installed tailwind using yarn add --dev tailwindcss@latest postcss@late

How to configure Vite dev server for running through a port proxy path?

I'm trying to use Vite dev server in a cloud-based development environment where I can serve on and connect to ports, but need to access them through a proxy pa

React PDF + Vite implementation Error: Uncaught SyntaxError

I'm trying to use the React PDF lib in a project that react created with Vite. I'm having problems rendering the PDF component and the error is very weird, coul

Change the output path for certain files during build - ViteJS

I'm making a static multipage website with ViteJS (html, scss and JS) and I can't find the way to change the build path of html files to put them into the root

Vue3 webcomponents production build problem

I'm trying to migrate my vue2 webcomponent to vue3, although the problem comes when i'm creating a build for production. I was using the vue-cli with --target w

make .d.ts for external library file available for project

I have a closed-source plain JS library that will be included via a <script> tag pointing to a CDN. I would like to author my own type definition file for

Overriding Vuetify variables when building a Vue2+Vuetify app with Vite

I'm trying to migrate a Vue2+Vuetify app from Vue-CLI/Webpack to Vite. The app has a couple of SCSS files, main.scss and variables.scss with the latter imported

NPM warning: 'unsupported engine'

I entered the command npm install -D tailwind css postcss autoprefixer vite in VS-Code. My environment is: NPM version: 8.1.2 Node.js version: 16.13.1 Which res

Vite recognizes link with sass on npm run build, but not on npm run dev

I am using a <link> tag to import a SASS/SCSS in the Vite/VueJS 3 index file: <link rel="stylesheet" type="sass" href="/src/assets/test.scss"> The

Reactjs : Failed to load module script: WIth MIME type "application/octet-stream" for sharepoint webpart

I'm using reactjs project for use as a webpart for the sharepoint project. But when i deploy the build project. It give me below error. Failed to load module s

HTTP requests stuck in Pending state when using Vite

I have a rather large Vue 3 application (~550 components). It takes two minutes just to run vue-cli-service serve and around 20 seconds to re-build it after eac

Vue3 (Vite) directly access parent data from child component

I have a simple landing page using Vue3 Vite (SSG) without Vuex. I need to pass a screenWidth value being watched in App.vue to a bunch of child components so t

Test suite failed to run import.meta.env.VITE_*

After adding the environment variable import.meta.env.VITE_* in my code, the tests with vue-test-utils started to fail, with the error: Jest suite failed to run

Vue 3 Vite - dynamic img src

I'm using Vue 3 with Vite. And I have a problem with dynamic img src after Vite build for production. For static img src there's no problem. <img src="/src/a

Why aren't the Tailwind classes taking effect in my Vite React project?

I have a Vite React project that uses Tailwind via PostCSS. However, none of the classes are reflecting the the localhost. Below are the files in the project: p

I can't setup proxy in mern stack(react-vite) and do not know the reason

I'm developing mern stack web application with react from vite.js and have a problem to deal with proxy. my client side runs at http://localhost:3000 and server

@meforma/vue-toaster clear function only works when pulled into local project folder, not from node_modules

As stated, the package @meforma/vue-toaster has a clear() function in the API here. My vue and vite project setup: main.js import Toaster from '@meforma/vue-toa

Vite and PostCSS issue, Invalid left-hand side in assignment

Everything was working fine, next day I'm getting an error Invalid left-hand side in assignment, the Chrome console tap was showing the error Invalid left-hand