Replies: 5 comments 1 reply
-
Yes, I also want to know how to do that |
Beta Was this translation helpful? Give feedback.
-
I'm not an expert here, but I tried adding this config to the But I wish I don't need to do that manually. export default defineConfig({
//
build: {
rollupOptions: {
input: {
main: "src/main.js",
alt: "src/alt.js",
},
},
},
}); |
Beta Was this translation helpful? Give feedback.
-
You can add export default {
build: {
rollupOptions: {
input: {
demo: "src/demo.js",
lib: "lib.js",
'index.html': "index.html",
},
},
},
} and this will put index.html in the right place, and update the URLs. I think I need some other option, since I want demo/lib filenames to also not be mangled (so I can count on a specific URL on CDN.) I guess I can also just copy them after. |
Beta Was this translation helpful? Give feedback.
-
How can I force to merge some files and keep others separated? |
Beta Was this translation helpful? Give feedback.
-
I also would like to see that being possible. My use case: Another one: |
Beta Was this translation helpful? Give feedback.
-
Is there an option to tell vite to keep scripts different Javascript files (instead of merge)?
index.html
output:
Everything is correct, I'd just like to have two scripts (main and addressValidation)
Beta Was this translation helpful? Give feedback.
All reactions