Stylesheet not loaded because of MIME-type

前端 未结 30 2881
猫巷女王i
猫巷女王i 2020-11-22 07:29

I\'m working on a website that uses gulp to compile and browser sync to keep the browser synchronised with my changes.

The gulp task compiles everything

30条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 08:15

    My problem is that I was using webpack and in my HTML CSS link I had a relative path, and anytime I would navigate to a nested page, that would resolve to the wrong path:

    
    

    so the simple solution was to remove the . since mine is a single-page application.

    Like this:

    
    

    so it always resolves to /index.css

提交回复
热议问题