I have this vite config using ‘rollup-plugin-framework7’. But every time i make on dev it reloads the entire page instead of just the component I updated. Is this a normal behaviour or my configuration is wrong somewhere?
I initially disabled the browserHistory cause whenever i go back from a sub page to the main page, it doesn’t load anything on the main page. I use tabbed views
I tried the changes but still got the same issue.
This is my app.js, I added cordova during the initialization
import $ from 'dom7';
import Framework7, { getDevice } from 'framework7/bundle';
// Import F7 Styles
import 'framework7/css/bundle';
// Import Icons and App Custom Styles
import '../css/icons.css';
import '../css/style.css';
import '../css/app.css';
// Import Cordova APIs
import cordovaApp from './cordova-app.js';
import store from './store.js';
import routes from './routes.js';
// Import main app component
import App from '../app.f7';
var device = getDevice();
var f7AppInstance = new Framework7({
name: 'AppName', // App name
theme: 'ios', // Automatic theme detection
el: '#app', // App root element
component: App, // App main component
// App store
store: store,
// App routes
routes: routes,
iosTranslucentBars: false,
iosTranslucentModals: true,
view: {
browserHistory: true,
browserHistorySeparator: '',
browserHistoryAnimate: !Framework7.device.ios,
// pushStateSeparator:'',
// pushState: true,
// preloadPreviousPage: false,
},
// Input settings
input: {
scrollIntoViewOnFocus: device.cordova,
scrollIntoViewCentered: device.cordova,
},
// Cordova Statusbar settings
statusbar: {
iosOverlaysWebView: true,
androidOverlaysWebView: false,
},
on: {
init: function () {
var f7 = this;
if (f7.device.cordova) {
// Init cordova APIs (see cordova-app.js)
cordovaApp.init(f7);
}
},
},
});
As you mentioned, you’re using Tabbed Views, but do note that browserHistory works only with Single View—specifically, the view-main.
Can you try restructuring your app to use a single view setup and test if browserHistory works as expected? That would help confirm whether the issue is due to the tabbed view structure or something else.