简体   繁体   中英

Linking a local copy of bootstrap

So Im trying to link a local copy of bootstrap (It works with a CDN). I have bootstrap.css installed in the same directory as index.ejs and yet I keep getting these 404 errors.

So the file path for bootstrap.css is /home/daniel/scheduler/doc_display/app/bootstrap.css

and index is: /home/daniel/scheduler/doc_display/app/index.ejs

Any help would be much apreciated

Your browser is going to look for the file relative to the location of the page it loads, so you need to make sure your path is correct.

Right now it's looking for it in the same folder as the index, which it looks like isn't where it's located.

I put the bootstrap.css file inside of my dist directory then included the new path inside the link tag. For some reason webpack seems to find paths when they are in the dist directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM