how to create multiple html files with vite?
I’m having a hard time trying to use vite. I have 2 html files and I would like to generate them with the imports automatically. However I’ve been able to do only one. I’m trying to import tachyons.css for all the pages right? That I could do it. but I also wanna create specific scripts for each page I don’t know how to config to set automatically. Not even compile it.
how to dynamic import a big util in vite
in my app, i use highlight.js to render my page, but this util is too heavy, so i need to use dynamic import to prevent it to block my page appear, i do it like this:
but when i deploy my app , i found that this util still load in my home page, though i doesn’t use it in my homepage: i feel very sad about this, so i ask for help
Import local assets using vite inside external library
I am building a library for a Website with Typescript and vite that exports one Main class. That class needs a Json file for the constructor and that Json file includes multiple URLs to assets like Images or Videos. These URLs are imported using this bit of code for further Processing inside the library:
Very verbose output from vite build
Does anyone recognise this output from vite build? I’m getting hundreds of lines like this and the build seems to have slowed considerably because of it. I’m pretty sure it’s linked to my updating vite, today, from 4.5 to 5.3.3.
How to add simple JSON API to Vite?
I just need to return simple JSON response for /api/status
: { "ok": true }
How to make Vite to generate native ES modules?
The export const some = 1
compiled by vite into ... exports.some = some; ...
.
How to bundle but keep exports in Vite?
I have library called lib.ts
, it’s made from multiple files, like lib/part1.ts
, lib/part2.ts
.
How to merge modules but keep exports in Vite?
I have library called lib.ts
, it’s made from multiple files, like lib/part1.ts
, lib/part2.ts
.
Build problem, ignoring base paramtere after multiple input file
My problem is that when I build a single file, it handles the URL specified in the “base” parameter perfectly. However, when I build two files, each including a file named “core.js” it seems like the “base” parameter is not used. The “modulepreload” disappears from the built files. (e.g.: const scriptRel=”modulepreload”,assetsURL=function(e){return”http://localhost.test/build/”+e%7D)
Configure @nx/vite:test executor’s reportsDirectory by using {workspaceRoot}/coverage/{projectRoot}
I wanna use {workspaceRoot} and {projectRoot} in vite executor reportsDirectory
configuration like this: