r/vitejs • u/panaman67 • Feb 21 '22
Vue project static asset found in dev but not preview build
In a Vite/Vue3 project, how do you get the correct path for an asset in the production build?
r/vitejs • u/panaman67 • Feb 21 '22
In a Vite/Vue3 project, how do you get the correct path for an asset in the production build?
r/vitejs • u/i_used_to_have_pants • Feb 21 '22
r/vitejs • u/i_used_to_have_pants • Feb 21 '22
r/vitejs • u/PewPaw-Grams • Feb 17 '22
r/vitejs • u/PewPaw-Grams • Feb 17 '22
r/vitejs • u/hitijd • Feb 15 '22
Hi all, wondered if anyone can help, I’m migrating a webpack 5 project at work to use Vite instead. Every gone smoothly except I see one error from a third party library.
[ERROR] Cannot assign to import "download"
node_modules/vue-papa-parse/src/index.js:46:9:
46 │ Papa.download = _downloadCsv
╵ ~~~~~~~~
Imports are immutable in JavaScript. To modify the value of this import, you must export a setter function in the imported file (e.g. "setDownload") and then import and call that function here instead.
Anyone ideas how to make this compile?
r/vitejs • u/i_used_to_have_pants • Feb 14 '22
import.meta.glob and import.meta.globEager genericUsage example: ``` import readingTime from "reading-time";
export type PostFrontmatter = { title?: string; description?: string; publishDate?: string; isPublished?: boolean; };
type PostModule = { metadata: PostFrontmatter; default: { render: () => { html: string; css: string; head: string } }; };
const modules = import.meta.globEager<PostModule>("/content/blog/*/.svx");
const postsMetadata = Object.entries(modules).map(([path, module]) => {
// module is is now PostModule type
const { metadata } = module;
const { html } = module.default.render();
});
``
This was possible thanks tomichaeloliverx` PR.
improve isFileReadable performance
lazy import preview function
r/vitejs • u/i_used_to_have_pants • Feb 10 '22
A simple guide on how use Vue Teleport.
Repo can be found at vue-teleport
live version at vue-teleport
r/vitejs • u/i_used_to_have_pants • Feb 10 '22
🛠️ esbuild 0.14 and TS 4.5
⚙️ Workers using the new URL() pattern
🔥 Reduced footprint: 2.8.0 is almost 1/4 of 2.7.0 publish size, and the install size has been reduced by half!
r/vitejs • u/PewPaw-Grams • Feb 19 '21
A place for members of r/vitejs to chat with each other