-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docusaurus v3.4] index.html in static directory raises "Multiple assets emit different content to the same filename" error #10198
Comments
Not a bug. We build to HTML pages. You cannot have an |
Understood, this is however a recent behavior as we have had a site since Docusaurus v2 and have handled the index page this way up until this version. We will look into swapping our approach if this is now expected. Edit: A However, in the navbar config you can set like such do avoid the broken links: themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
href: "pathname:///"
}, Using the Now the build will complete, and all links work. |
this causes the development build to fail (facebook/docusaurus#10198)
* fix(voucherContext): handle errors in fetch * refactor: remove index.html this causes the development build to fail (facebook/docusaurus#10198) * fix(validate): dont fail if file was deleted * refactor(voucherContext): code cleanlyness taken from #1277 (comment)
Hmmm. If you don't have a |
During https://webpack.js.org/plugins/html-webpack-plugin/ Afaik this file is served from memory when using the dev server. We could probably do something but I'm not sure what makes sense. Do you expect Docusaurus dev server to start on I'm surprised this ever worked in v2. This behavior probably broke a long time ago already. Maybe we could generate a random index name, and use this in |
For additional context, this remains working on Docusaurus version
I was also in this mindset of thinking, that the
I'm not sure what the best solution here would be, but this feels like it would make sense. |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Using
docusaurus start
while having aindex.html
in thestatic
directory will cause the following error:Conflict: Multiple assets emit different content to the same filename index.html
Reproducible demo
https://codesandbox.io/p/devbox/kind-khorana-zg4f99?file=%2Fstatic%2Findex.html%3A5%2C8
Steps to reproduce
index.html
in the root of thestatic
directoryExpected behavior
For the html file to be added to the build like before this update, and to be able to serve a index.html file as the landing page.
Actual behavior
Error mentioned above occurs.
Your environment
No response
Self-service
The text was updated successfully, but these errors were encountered: