question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prerender fails when Vite build.assetsDir option is specified

See original GitHub issue

Steps to Reproduce:

  1. add build.assetsDir option to vite.config.js with any path other than the default “assets”
  2. run vite build followed by prerender command
  3. Observe that an error is thrown originating in collectAssets in /dist/getPreloadTags.node.js

Expected Results:

Customizing the assetsDir should successfully prerender the site into the customized directory

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Apr 7, 2021

AFAICT, this should fix it. I will release later today.

0reactions
brilloutcommented, Apr 10, 2021

Also btw if you need something from me, feel free to push. I don’t mind.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build Options - Vite
assetsDir #. Type: string; Default: assets. Specify the directory to nest generated assets under (relative to build.
Read more >
Options for assets building without adding hash #378 - GitHub
I'm trying to make a library builder out of create-vite-app , and it is close to useable with one last step, here's the...
Read more >
Vite - change ouput directory of assets - Stack Overflow
I need to create a different folder for js and css files under assets . In other words, I need to put js...
Read more >
Pre-rendering (SSG) - vite-plugin-ssr
Pre-rendering means to render the HTML of our pages at build-time (when we run $ vite ... We opt into pre-rendering by setting...
Read more >
How to build and deploy with Vite JS - YouTube
What Is Vite ? Vite is the French word for fast and is a Javascript development server and bundler that delivers source files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found