-1

I'm using vite in a project and my folder structure is like this

youtube_comments/
   src/
    js/
     script.js
    sass/
     styles.sass
   index.html

When i move the index.html file in the root to the src folder and convert

 rollupOptions: {
      input: {
        main: path.resolve(__dirname, 'index.html'),
      },
    },

to

 rollupOptions: {
      input: {
        main: path.resolve(__dirname, 'src/index.html'),
      },

there appears to be a src folder in my dist folder although i want my index.html to be in the root of the dist foler

1 Answer 1

0

First, You can use the outputDir property along with Rollup’s plugin or use the build option to control how paths are handled: Second, Ensure that the file paths are updated correctly when moving files from the src folder to dist. You might need to manually manage certain files if the output structure still keeps the folder nesting.

Sign up to request clarification or add additional context in comments.

1 Comment

It's vite actually not rollup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.