My dir looks like that :
|-project
-gulpfile.js
|-build
-index.html
|-js
-app.min.js
-vendors.min.js
|-styles
-all.css
-vendors.min.css
I inject the css file with:
gulp.task('index',function () {
return gulp.src('src/index.html')
.pipe(inject(gulp.src(['http://localhost:5000/styles/all.css'], {read: false})))
.pipe(gulp.dest('build'))
.pipe(livereload());
})
I set up a local server with Node.js, when I do the request , the HTML file loads up, but the .css file doesn't connect for some reason.
I use this task for setting the server :
gulp.task('connect', function() {
connect.server({
root: 'build',
livereload: true,
port: 5000
});
});
To everyone that may encounter my problem,that would be the solution.