0
내 gulpfile.js
에서 항상 을 반환하도록 express
을 설정했습니다.gulp-livereload가 "Uncaught SyntaxError : 예상치 못한 토큰 <"을 발생시키는 이유는 무엇입니까?
var server = express();
server.use(livereload({ port: 35729 }));
server.use(express.static('./app'));
server.all('*', function(req, res) {
res.sendFile('index.html', { root: './app' });
});
server.listen(8000);
refresh.listen(35729);
처음에는 localhost:8000
으로 이동합니다. 내 각 경로는 http://localhost:8000/home
으로 리디렉션됩니다.
, 그때 나는 http://localhost:8000/home
를 새로 고칠 경우, I 참조 콘솔에서 다음과 같은 오류 :
Uncaught SyntaxError: Unexpected token <
왜 이런 일이?
감사합니다. 이것은 문제를 해결했습니다. –