it's a pretty simple requirement,
I hope the building result can keep the export statement in main.js,
so that I can load the script in a <script type="module"> tag and get the exported variable.
but now, the building result keeps import statement, but the export export default is lost.
any idea ?
// entry point 'main.js'
import { mount } from "./lifecycle";
export {mount};
export default mount();
// vite-config.js
export default defineConfig({
plugins: [svelte()],
build:{
rollupOptions: {
treeshake: false,
output: {
format: 'es'
}
}
},
})