0
在我的項目試圖引用CSS時,我收到以下錯誤加載從bower_components資源和JS文件無法使用Vue.js CLI
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8080/bower_components/bootstrap/dist/css/bootstrap.min.css
這是我的文件結構
app
|bower_components
|bootstrap
|dist
|css
| bootstrap.min.css
|jquery
|dist
|jquery.min.js
|build
|config
|node_modules
|src
|static
|index.html //The file I am receiving error on
public //using Slim framework with PHP to generate RESTful API
src
vendor
在我的index.html
文件我正在使用以下代碼嘗試引用bootstrap.min.css文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Template</title>
<link rel="stylesheet" href="./bower_components/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
我正在使用Visual Studio代碼,這使得能夠CTRL +單擊鏈接到bootstrap.min.css文件並加載好,所以我不確定我在哪裏出錯了?
我使用vue.js CLI
作爲app
文件夾,並使用與Slim Framework
以PHP
產生如果那幫助public/src/vendor
文件夾一個RESTful API?任何幫助將不勝感激。
你試過從鏈接「./」刪除? – Aaron
@Aaron是的,仍然收到相同的錯誤。我已經嘗試過使用vue.js CLI,它的工作原理,所以它肯定與此有關,只是不知道如何... – mcclosa