Skip to content

编译产出 vite 与 webpack 不一致 #281

Open
@MBearo

Description

@MBearo

reskript v5.1.0

// reskript.config.ts
build: {
            appTitle: 'Vercel',
            publicPath: '/vercel/assets/',
        },

编译后的 index.html 中

  • webpack 的资源路径是 /vercel/assets/xxxxx
  • vite 的资源路径是 /vercel/assets/assets/xxxx

翻了下代码,vite 的资源路径是配置里的 base + build.assetsDir,build.assetsDir 默认是 assets,配置中的路径只覆盖了base导致

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions