moztw / www.moztw.org

Repository of moztw.org
https://moztw.org/
Mozilla Public License 2.0
55 stars 59 forks source link

fix(bs): replace all dlff.html to dlff.shtml #685

Closed pan93412 closed 2 years ago

pan93412 commented 2 years ago

本地開發環境的 dlff.shtml 即生產環境的 dlff.html,但 browser-sync 由於先前不會自動替換相關檔名,導致乾淨環境執行 npm run start 時會拋出「找不到 dlff.html」的錯誤。本 PR 透過在 browser-sync 的 Middleware,加上 replace 檔名的 statement 來解決此問題。

註:本 PR 由於只在 npm run start 時動態修改檔案內容,不會影響生產環境的運作。

irvin commented 2 years ago

https://github.com/moztw/www.moztw.org#using-nodejs-directly 的 0. 可以一併砍掉

pan93412 commented 2 years ago

r? @irvin