Category "vite"

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>

Import.meta.env undefined on production build vitejs

I am using vitejs to compile my react app statically, however after build .env imports become undefined which is not the case on development stage. reading the

Script from localhost:5555 was blocked because of a disallowed MIME type (“image/png”) in vitejs

I am dynamic importing 9 images but the site crash with these err messages Uncaught (in promise) TypeError: error loading dynamically imported Script from &ldq

Nuxt3 Vite server port

I need to config server port for Nuxt3. I try to do it so: nuxt.config.ts import { defineNuxtConfig } from 'nuxt3' export default defineNuxtConfig( vite: {

Enable sourcemaps in Vue-Vite

Is it possible to enable sourcemaps in Vue-Vite in production environment? I would like to use it for Bugsnag. Can't find anything about it in the docs. In dev

Vite support for decorators

My code has some .js and .jsx files that use Mobx decorators. I tried adding the babel plugin, but it seems that it's being ignored. My vite config is import {

How to load environment variables from .env file using Vite

I want to load environment variables from the .env file using Vite I used the import.meta.env object as mentioned in Docs .env file: TEST_VAR=123F when trying

How to config Vite build output that can run with <script type="text/javascript"></script>

How can I config Vite build to output with script type="text/javascript" I'm using Vite 2.7.2, when finished building the code in HTML output the script tag as

How to load a Font from node_modules with Vite?

I'm trying to load a company font from a node_modules folder which only includes fonts and icons, it was working locally. At first, I thought it was because Vit

I can't import qs in vite

I use vite, ts and vue3. Now I want to use qs.stringfy() to build a url's query, but it panic. I use yarn add @types/qs to add qs. My code like this import

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/

"TypeError: Failed to fetch dynamically imported module" on Vue/Vite vanilla setup

We have a vanilla Vue/Vite setup and I'm receiving TypeError: Failed to fetch dynamically imported module on sentry logs. It seems like the errors are correlate

Redirection by Vite like proxy or external 301 redirect

how i can set redirect by pattern by Vite? Example site up on http://localhost:3000/ I request image like this http://localhost:3000/2a84a6ddfd2c.png or http:

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