-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(v2) ionic serve doesn't detect changes in vagrant host #759
Comments
From @tomsun on January 28, 2016 16:15 Same issue when running ...for the same reason: In both scenarios VirtualBox's "Shared Folders" feature tends to be a part of the workflow (Edit files in the GUI on the host OS, run Node in the VM), which is why the file events do not propagate: https://www.virtualbox.org/ticket/10660 |
From @cxcxcxcx on January 29, 2016 8:31 The thread suggested enable --watch-poll for the webpack dev server. Not sure if there would be an equivalent for ionic serve? Thanks! |
Yes, we should expose watch options for |
Gave this a shot: ionic-team/ionic-app-lib#73 Seems to detect js updates, but not html or sass (tested with default webpack config for an Ionic 2.0.0-beta.1 app) ( Also added an entry to the --help menu over here: tomsun@e640f4c ) |
@tlancina is correct, this is due to vagrant's NFS filesystem syncing. I seem to have gotten this working by adding options to the gulp task in the meantime for HTML, and CSS. For browserify/watchify, polling works as well, but takes ~2mins to build :p Would be nice to have @tomsun changes pulled in for us vagrant users! :) Also, here's the relevant pieces of my gulpfile.js: //Going to use polling for gulp watch because synced folders don't emit filesystem changes
//Gulp: https://github.com/floatdrop/gulp-watch/issues/213
//Browserify: http://stackoverflow.com/questions/27619248/watchify-update-event-never-fires-in-virtualbox
var watchInterval = 1000;
var watchOptions = {
usePolling: true,
interval: watchInterval
};
// Task to watch app folder for changes to semi e-build the app
gulp.task('watch', ['clean'], function(done) {
runSequence(
['sass', 'html', 'fonts', 'scripts'],
function() {
gulpWatch('app/**/*.scss', watchOptions, function() {
gulp.start('sass');
});
gulpWatch('app/**/*.html', watchOptions, function() {
gulp.start('html');
});
buildBrowserify({
watch: true,
watchifyOptions: {
poll: true,
interval: watchInterval
},
}).on('end', done);
}
);
}); |
Thanks for opening the issue. It seems that issue has been resolved. I am going to close this issue but please feel free to reopen another issue if this occurs again. |
From @cxcxcxcx on January 27, 2016 8:32
(This is for ionic v2)
I'm running ionic serve within a vagrant VM, and found that although it detects changes within the VM, but changes from the host wouldn't be respected.
On the other gulp watch works fine for my old projects.
Searching around this seems to be webpack problem, which has been resolved bug polling may need to be enabled separately: webpack/webpack#125
Is there an easy way to enable polling for the watching for ionic serve v2?
Thanks!
Copied from original issue: ionic-team/ionic-framework#5210
The text was updated successfully, but these errors were encountered: