Stylesheet not loaded because of MIME-type

前端 未结 30 3120
猫巷女王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:14

    Adding to a long list of answers, this issue also happened to me because I did not realize the path was wrong from a browser-sync point of view.

    Given this simple folder structure:

    package.json
    app
      |-index.html
      |-styles
          |-style.css
    

    the href attribute inside in index.html has to be app/styles/style.css and not styles/style.css

提交回复
热议问题