diff --git a/docs/guide/build.md b/docs/guide/build.md index 370b1264e68475..7b711fe03a0bea 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -114,6 +114,8 @@ export default defineConfig({ If you specify a different root, remember that `__dirname` will still be the folder of your vite.config.js file when resolving the input paths. Therefore, you will need to add your `root` entry to the arguments for `resolve`. +Note that for HTML files, Vite ignores the name given to the entry in the `rollupOptions.input` object and instead respects the resolved id of the file when generating the HTML asset in the dist folder. This ensures a consistent structure with the way the dev server works. + ## Library Mode When you are developing a browser-oriented library, you are likely spending most of the time on a test/demo page that imports your actual library. With Vite, you can use your `index.html` for that purpose to get the smooth development experience.