Questions tagged [vite]

For questions about using Vite, a two-part build tool (dev server + build command) that aims to provide a faster and leaner development experience for modern web projects.

4741 questions
12
votes
3 answers

Could not auto-determine entry point from rollupOptions

I'm trying to dockerize a frontend app which was created using vite and vue3. It is not working as a container. Here is the error response. (!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit…
krezus
  • 1,281
  • 1
  • 13
  • 29
12
votes
19 answers

React Material UI createTheme_default is not a function

I have created a project using vite and react. I create a theme to set my project into right to left. Everything was ok and the project was running properly. const theme = createTheme({ direction: 'rtl' , typography: { "fontFamily":…
Mehdi
  • 520
  • 1
  • 5
  • 9
12
votes
1 answer

Vite library mode vs rollup

Vite has revolutionised web development for frontend js/ts apps. As it is based on rollup and supports library mode, I wonder if there is still any advantage building js libraries directly with rollup or shall I use vite instead? Vite hides…
husayt
  • 14,553
  • 8
  • 53
  • 81
12
votes
1 answer

What's the difference between Nuxt and Vite?

I'm learning Vue, and it's ecosystem, and now I read about nuxt.js. As I understand, this is tool which help us to build Vue apps, but don't we do the same with vite.js? What's the difference between them?
Explicit
  • 133
  • 1
  • 1
  • 6
12
votes
3 answers

plugin:vite:import-analysis - Failed to parse source for import analysis because the content contains invalid JS syntax. - Vue 3

I've updated my project from Vite 2.x to Vite 3.0.2 and suddenly i got this error: [plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the…
Kayahan Kahrıman
  • 388
  • 1
  • 4
  • 14
12
votes
3 answers

ReferenceError: $ is not defined, Jquery Import with vite

I tried with fresh install laravel 9.20 and with minimum configuration in vite.config.js import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ plugins: [ laravel({ …
Johan Nes
  • 159
  • 2
  • 9
12
votes
1 answer

Vite Vue 3 library build doesn't implicitly include dist/style.css

I built a library project (Vue 3, Vite) and I want to include it in a host project via package.json. But I faced a problem where I can import the components and run a simple programme with those imported components but their styles are gone. Please…
Beast
  • 370
  • 2
  • 14
12
votes
3 answers

Add Vuetify 2 to vite project

My team developed application in Vue 2 with class based components and typescript. Now, we want to migrate to Vite - because of all the advantages it carries. I have followed this guide (which I can only…
JozeV
  • 616
  • 3
  • 14
  • 27
12
votes
11 answers

enable hot reload for vite react project instead of page reload

I am new to vite and I just started a new react application. My project had hmr (hot module replacement) enabled and it was ok. I just added some changes but when I start it now the hmr is disabled and when adding new change the browser is reloading…
Mahdi-Jafaree
  • 882
  • 2
  • 9
  • 22
12
votes
2 answers

Vite build warns: script can't be bundled without type="module" attribute

# Vite terminal after running "npm run build" build started...
docta_faustus
  • 2,383
  • 4
  • 30
  • 47
12
votes
6 answers

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 resulted in following warning: npm WARN idealTree Removing dependencies.vite in favor of…
Shresta Agrawal
  • 123
  • 1
  • 1
  • 5
12
votes
2 answers

Vuejs3, Vite - How to run Production Build

I'm trying to run a simple vue.js app. My setup is a vue.js 3 app with vite, built according to the tutorial on the official website. (https://vitejs.dev/guide/#command-line-interface) Now I try to deploy that on a cloud and I need the command to…
user3603819
  • 597
  • 1
  • 4
  • 18
12
votes
2 answers

Custom URL in Vite dev server (multi page app)

I'm building a multi page app with Vite (migrating from Webpack). To open the login page in the dev server I have to go to: localhost:3010/login.html Is it possible to tweak the Vite config to serve login.html with the URL as: localhost:3010/login…
Michael Johansen
  • 4,688
  • 5
  • 29
  • 47
12
votes
2 answers

how to force vite clearing cache in vue3

I have a side project with Vue.js 3 and vite as my bundler. After each build the bundled files got the same hash from the build before, like: index.432c7f2f.js <-- the hash will be identical after each new…
wittgenstein
  • 3,670
  • 7
  • 24
  • 41
12
votes
1 answer

how to config lodash tree shaking in vite

Now, I'm using Vite2.x build my project with 'rollup-plugin-visualizer', I found it build entire lodash package in so, how to config the vite2.x to reduce the lodash package size
Heaven
  • 133
  • 1
  • 5