Category "vite"

How to generate a build that exports each file type to its own folder? [duplicate]

I'm using Vite. How to generate a build that exports each file type to its own folder? I need an output similar to this: /dist /styles/*.c

Web3js fails to import in Vue3 composition api project

I've created a brand new project with npm init vite bar -- --template vue. I've done an npm install web3 and I can see my package-lock.json includes this packag

vite.config.js rollupOptions leads to "Unexpected token" error during build

I am currently trying to switch my laravel project from laravel-mix to something like Vitejs. I followed the tutorial available here: https://owenconti.com/post

How to insert git info in environment variables using Vite?

How to get information from git about current branch, commit date and other when using Vite bundler?

How to debug Vue 3 Vite while on lan --host

How can I debug while using --host option on Vue 3 Vite so I can debug my phone instance for example. At the moment Im using visual studio code plugin "Vite" la

Scss not loaded with Vite

The build with Vite and Vue works like a charm (so ist the path correct). However, it does not with storybook. Here my config: vite.config.js import { defineCon

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