【问题标题】:Is there an equivalent to Vite's build.outDir in SvelteKit, and how can you use it?SvelteKit 中是否有与 Vite 的 build.outDir 等效的东西,如何使用?
【发布时间】:2022-02-16 05:15:42
【问题描述】:

我正在尝试从this page 适应 SvelteKit 的 Django-Svelte 设置,其中使用 Rollup,Svelte 应用程序构建在 Django 应用程序的静态目录中。

我找不到如何做到这一点。我认为它与 Kit 的选项有关,例如 paths.base、paths.assets 和 appDir,但我什至无法以任何方式配置 paths.assets。

在 Vite 中,有 build.outDir 但被 Vite 忽略了。

【问题讨论】:

    标签: svelte sveltekit


    【解决方案1】:

    使用 SvelteKit,输出通常基于适配器。例如,adapter-static 允许更改输出的放置位置。所有输出都基于.sveltekit 文件夹,我认为它是不可配置的。

    【讨论】:

    • 谢谢。那么,我将按照教程中的方式坚持汇总。
    猜你喜欢
    • 1970-01-01
    • 2016-11-01
    • 1970-01-01
    • 2022-12-22
    • 2010-09-09
    • 2022-01-10
    • 2018-05-26
    • 2014-10-14
    • 2012-12-30
    相关资源
    最近更新 更多