Here is the structure

enter image description here

Here is a gulp

gulp.task('serve', ['sass', 'js'], function () { browserSync.init({ server: 'app' }); gulp.watch(['app/src/sass/**'], ['sass']); gulp.watch('app/src/js/*.js', ['js-watch']); gulp.watch('app/*.html').on('change', browserSync.reload); }); gulp.task('default', ['serve'], function () { console.log('gulp is watching...') }); 

If through script to connect angularjs in index.html

 <script src="../node_modules/angularjs-ie8-build/dist/angular.min.js"></script> 

then when downloading via browser-sync angular is not defined. The path is correct, not via b. works

    1 answer 1

    Browser-sync looks only for one folder, and as it surrounds it, it is impossible to go beyond the folder. You need to throw this script in the app folder.
    To do this, create a task that takes this script from node_modules and merges them with the rest of the scripts, if your task by js performed this kind of action, or simply throw this file into the folder you need in the app via task or manually.