在上傳本地專案到gitlab、github時,理所當然要把node_modules資料夾砍掉
反正clone下來npm install就好了

結果報錯 囧

乍看會以為是Bootstrap的問題,其實不是,因為Bootstrap確實存在於node_modules裡,重點是這句
No PostCSS Config found in xxxxx

上網查詢了一下,發現大家都有這個問題,原來這是webpack3以後才有的問題,這是關於webpack配置產生的錯誤

解決方法,在根目錄新增一個檔案postcss.config.js

沒錯就是根目錄喔,理論上是和package.json和readme.md同一層級

然後在postcss.config.js貼上以下內容

module.exports = { 
plugins: { 
'autoprefixer': {browsers: 'last 5 version'} 
}
}

存檔後再執行
npm install、npm run dev 應該就是正常狀態囉!