[VUE CLI] run npm run build , Tip: built files are meant to be served over an HTTP server. Opening index.html over file:// won't work.
IPFS
npm run dev 是開發環境 npm run build 是生產環境 當您執行 npm run build 時,會產生dist 目錄,裡面包含 index.html & static 資料夾.大家在下指令打包時, 應該都會看到很像錯誤訊息的東西 Tip: built files are meant to be served over an HTTP server. Opening index.html over file:// won't work.

把 assetsPublicPath: '/', 修改為 assetsPublicPath: './',

如果你想本地開啟的話, 可以在npm run build完成之後執行以下命令 npm install -g http-server // 這個命令只需執行一次, 安裝過之後, 以後就不需要重複安裝

Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!