1

Sapper アプリで .md ファイルのディレクトリを開いて読み取ろうとしています。インポートを試みましたが、文字列式 (`file${index}.md`) を使用できません。そのため、fsノードモジュールを介してファイルを開いて読み取ろうとしましたが、サーバーで次のメッセージが表示されます:

preferring built-in module 'fs' over local alternative at 'fs', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning preferring built-in module 'fs' over local alternative at 'fs', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning 'fs' is imported by src/routes/blog/[slug].svelte, but could not be resolved – treating it as an external dependency 'default' is imported from external module 'fs' but never used

4

1 に答える 1