Skip to content

Add an option to allow pre-bundle dependencies using rollup #8781

@hronro

Description

@hronro

Description

We currently use esbuild to do pre-build dependencies, however, there are some limitations of esbuild, and esbuild can not handle some edge cases very well. Using rollup is slower than using esbuild, but slower is better than can't run.

Suggested solution

Maybe we can add an option called backend in optimizeDeps, which can be set to esbuild and rollup, and the default value is esbuild.

export default defineConfig({
  optimizeDeps: {
    backend: 'rollup', 
  }
})

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions