Conversation
d1e7310 to
4a2b012
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
経緯
basePathを設定するとローカルでの動作確認がほぼできなくなるhttp://localhost:5000で立ち上がり、相対パスで指定された画像や md ファイルが全部 404 になるpixiv.github.io/charcoal/docsという URL でドキュメントが配信されているhttp://localhost:5000/docsのような立ち上げ方ができるツールが良いいまの docsify-cli ではこれが叶わないので別のツールで開発サーバーを立ち上げるように変える
やったこと
いくつか候補をさがしてみて(
http-party/http-serververcel/serveなど )、いずれも basePath に相当する機能をサポートしてないことが分かった。と思ったが実は
viteにこの機能があった(かつ vite はすでにインストールされている)のでそれでやってみる。https://ja.vitejs.dev/guide/build.html#public-base-path
js や css の依存解決が一切必要ないところに vite を使うのは若干不思議な感じだが、もっとも簡単かつこの分野で信頼できるツールの一つだと思うのでまぁ良いでしょう。
バージョニング
{+ 破壊的変更なし +} / {- 破壊的変更あり -}
チェックリスト
不要なチェック項目は消して構いません