F
F
Ferum12019-01-13 22:20:05
css
Ferum1, 2019-01-13 22:20:05

How to display styles on localhost?

Hello, I'm just learning Gulp and I ran into such a problem, styles are not displayed when the local host is running, I tried changing the paths in index.html. With the standard path D:/node/build/css/all.css an error pops up in the browser, changed the path to localhost:3000/node/build/css/all.css another error popped up. Has anyone come across?
photo attached
5c3b8efc9756f176636410.png5c3b8f138edb7551812570.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
monochromer, 2019-01-14
@monochromer

If the index.html file is inside the build directory and provided baseDir: "./"for browser-sync, then the path must be written like this:
But I would change the server directory: baseDir: "./build"and then the paths would be written like this:

<link rel="stylesheet" href="css/<some-css-filename.css>">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question