Category "vite"

How to use sass global variables from other components in vite/vue3

I want to use and change global variables from other components, my files structure looks like this... enter image description here I have my variables in globa

Watch Vue 3 global variable for changes

I set a provider in my main.ts file: app.provide('currentPage','test1') And then inject it in a component Home.vue: inject: ['currentPage'], I then can update i

How can I get live-reload on a local npm package in a monorepo?

I'm setting up a monorepo workspace for a Vue 3 (vite + ts), cloud functions, & shared-lib (shared functions and ts interfaces etc.). I can get the import o

Vite Server is running but not working on localhost

Vite + Reactjs server is running but I am getting "This localhost page can’t be found No webpage was found for the web address: https://localhost:4200/" o

Vue 3 - Extend a Vue component with additional props with Typescript support

I'm trying to extend a 3rd party Vue component (from PrimeVue) and add additional props, but I'd like to keep the typings of the original component and also uni

Get POST request body in Vite server.proxy["/api"].configure

I am migrating a project from Webpack to Vite and have run into an issue with proxying requests to one of the endpoints in the MVC.Net backend. Due to circumsta

import.meta.glob() can only accept string literals

I have a vite vue3 project. In the component I try to get the URL of all images from a folder. It works when I write const images = import.meta.globEager("/src

TypeError: Cannot read properties of null (reading 'isCE') - Custom Component Library

I am having trouble building a custom component library for Vue 3 using ViteJS and NPM. I have included a basic illustration of my issue below, can someone plea

Absolute path not working in Vite project React TS

I'm struggling to get absolute path to work in a Vite react-ts project. Here's how I created the project npm init @vitejs/app npx: installed 6 in 1.883s √

how to import a json file using vite dynamicly

I am using vue-i18n in a Nuxtjs project, and I want to import my locale files with vite dynamicly. when I am using webpack, those code run well plugins/i18n.js

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