I was trying to get a barebones Vite+Svelte+F7 project working, but it doesn’t seem to load properly (sorry for the vagueness). I was wondering if anyone actually has a simple Vite config that works with building a F7 web app?
it works without problems. Official Svelte kitchen sink is built with Vite https://github.com/framework7io/framework7/blob/master/kitchen-sink/svelte/vite.config.js
Thank you! it looks like it work, however the full page seems to reload even if I enable HMR like the following:
export default {
plugins: [svelte()],
...
resolve: {
alias: {
framework7: path.resolve(__dirname, `../../${buildFolder}/core`),
'framework7-svelte': path.resolve(__dirname, `../../${buildFolder}/svelte`),
},
},
+ server: {
+ hmr: true,
+ }
};
Have you gotten HMR to work with Vite and the kitchen sink repo?
I believe the new @svitejs/vite-plugin-svelte
in vite.config.js should help to make HMR work. The only problem is I now run into this error again:
There is something about the way f7 svelte components are created which does not work with Svelte compilerOptions.dev=true. the @svitejs/vite-plugin-svelte
sets compilerOptions.dev= true
Has anyone gotten this to work when using the CLI to create a project? I would ideally want to replace Webpack with Vite in my project but I’m not sure if that will be possible.