Answer the question
In order to leave comments, you need to log in
How to reach bower_components?
#Структура проекта
├── bower_components
├── bower.json
├── build
├── gulp
├── gulpfile.js
├── node_modules
├── package.json
├── README.md
└── src
# Таск для gulp, эдакий минисервер для фронтенда
gulp.task('webserver', function() {
var express = require('express');
var server = express();
// это работает
server.use(express.static(__dirname + "/build"));
// это КАКОГО-ТО ХРЕНА НЕ работает
server.use('/bower_components', express.static(__dirname + "/bower_components"));
// это работает
server.all('/*', function(req, res) {
res.sendfile(__dirname + 'build/index.html');
});
return server.listen(8000);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question