S
S
Sergey2016-05-26 14:46:00
JavaScript
Sergey, 2016-05-26 14:46:00

How to add bower_component static folder?

There is a plugin (server) https://www.npmjs.com/package/gulp-webserver
How to add bower_component static folder to project

// Запуск сервера
gulp.task('server', function() {
  gulp.src('./build')
    .pipe(webserver({
      open: true,
      fallback:   'index.html'      
    }));
  }
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-07-18
@Sergamers

var webserver = require('browser-sync').create(); // сервер

// Запуск сервера
gulp.task('server', function() {
  webserver.init({
    server: {
      baseDir: "./build",
      routes: {
        "/bower_components": "bower_components"
      }
    }
  });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question