Closed pan93412 closed 2 years ago
本地開發環境的 dlff.shtml 即生產環境的 dlff.html,但 browser-sync 由於先前不會自動替換相關檔名,導致乾淨環境執行 npm run start 時會拋出「找不到 dlff.html」的錯誤。本 PR 透過在 browser-sync 的 Middleware,加上 replace 檔名的 statement 來解決此問題。
dlff.shtml
dlff.html
npm run start
註:本 PR 由於只在 npm run start 時動態修改檔案內容,不會影響生產環境的運作。
https://github.com/moztw/www.moztw.org#using-nodejs-directly 的 0. 可以一併砍掉
r? @irvin
本地開發環境的
dlff.shtml
即生產環境的dlff.html
,但 browser-sync 由於先前不會自動替換相關檔名,導致乾淨環境執行npm run start
時會拋出「找不到dlff.html
」的錯誤。本 PR 透過在 browser-sync 的 Middleware,加上 replace 檔名的 statement 來解決此問題。註:本 PR 由於只在
npm run start
時動態修改檔案內容,不會影響生產環境的運作。