Skip to main content

All Questions

Tagged with
0 votes
0 answers
40 views

React: Expected “;” but found “:” with Vite and TypeScript

I’m encountering an error while using Vite with TypeScript and ESLint. The error message is as follows: ERROR: Expected ";" but found ":" [vite] Pre-transform error: Transform ...
ravivlb's user avatar
  • 199
1 vote
0 answers
36 views

Is there an option in vite.config.ts to include all types in index.d.ts when building with Vite bundler?

I published a custom hook package using Vite bundler, but in the dist folder, the index.d.ts does not contain type declarations for functions, causing errors when trying to import types. The file ...
sukki Kwon's user avatar
0 votes
0 answers
19 views

What is a good way to prevent file getting renamed when running npm run build

I am running npm run build for production and this is my script code. "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", "lint": "eslint . --ext .vue,.js,...
Shinzie's user avatar
  • 15
0 votes
0 answers
24 views

Is it redundant to have a function to load all the file not in the dist folder in a Vite React Project?

Before I say what the problem is could I get some links to some resources that help me understand how Vite build files and how the whole build process works? Especially when it comes to the asset ...
Drayden's user avatar
  • 11
1 vote
2 answers
81k views

Is it true to have the index-xxxx,js/css files are necessary to force the cache to clear?

So I've been told by the project manager of this project I'm volunteering for that keeping names for files like index-xxxx.js will help to force the cache to clear if we use them in like the root ...
Drayden's user avatar
  • 11
1 vote
0 answers
66 views

Failing the npm run build with exit status 137 in react with vite

vite build --out-dir build The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. vite v5.2.13 building for ...
Archan Bhalani's user avatar
0 votes
1 answer
89 views

Env variable visible in Vite build production environement

I have only a simple frontend React/Vite application (used for AWS Cognito login), no backend. All my environment variables are in an .env file prefixed with "VITE_". How can I keep them ...
vanessa's user avatar
  • 421
0 votes
0 answers
23 views

Vite production build files prevent React project from being built

So I am working on a vite React project for a bit and I'm new to it. I have a root index.html and the index.html in dist folder. I put some includes in the root index and some in dist folder. The ...
Drayden's user avatar
  • 11
0 votes
0 answers
19 views

Nuxt build issue: Lexical.node.mjs not found, only Lexical.prod.mjs present

I'm using Nuxt and Lexical.js and I'm trying to build the project with the nuxt build command. After this, my dependencies are placed in the .output/server/node_modules folder in a compiled form. ...
Andrew's user avatar
  • 1,005
-1 votes
1 answer
76 views

React 18 react-dom/client build fail on Vite

I'm attempting to build my React application after upgrading from version 17 to 18. After upgrading the React DOM and React versions to "react": "18.2.0" and "react-dom": ...
Hakob Sargsyan's user avatar
0 votes
0 answers
52 views

npm run build for vite project not working Error: Refused to apply style because its MIME type ('text/html') is not a supported stylesheet MIME type

After building the vite project using npm run build, the compiled/built html code does not contain correct path. However the same project when run through npm run dev runs perfectly and the issue ...
Raghav Korde's user avatar
0 votes
1 answer
34 views

How to build from the same code source different bundles?

I am working on a web app and trying to build a "light" version of it without all the features that are going to be served on a different address. I don't want to fork the project and have ...
ldekester's user avatar
  • 171
0 votes
1 answer
66 views

MacOS/ARM64 build vite project for Linux/AMD64 stuck [duplicate]

I have a vue.js (3.2) project with vite (5) and vitejsvue plugin (5.0.3). I want to build it in docker on MacOS/ARM64 for Linux/AMD64 server. As shown in the screenshot the build works but it keeps ...
Philipp Lehmann's user avatar
0 votes
0 answers
28 views

React Vite build error: Not bundling assets properly

I'm encountering an issue with the React Vite build process in my project. When attempting to build my React application using Vite, I'm facing difficulties with bundling certain assets. Despite ...
Mustafa Bharmal's user avatar
0 votes
0 answers
42 views

vite works in dev but not after build

I have a react vite v5 application, it works fine in dev mode, when i build the app, it builds without anu errors but the app doesn't work i get this error: Uncaught TypeError: Cannot read properties ...
Yaniss Guendouzi's user avatar

15 30 50 per page
1
2 3 4 5
12