Skip to content

Commit

Permalink
docs: clarify html input entry name ignored for HTML files (#13389)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 31, 2023
1 parent 2497756 commit aec1c1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/guide/build.md
Expand Up @@ -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.
Expand Down

0 comments on commit aec1c1d

Please sign in to comment.