Skip to content

[doc & comment conflict] document and comments about build.target are a little confused #19034

Closed

Description

@zhaojjiang

Describe the bug

about build.target

The document shows

https://vite.dev/guide/build.html#browser-compatibility

Note that by default, Vite only handles syntax transforms and does not cover polyfills.

But the code comment shows except for dynamic import

* and the lowest supported target is es2015/es6. Note this only handles
* syntax transformation and does not cover polyfills (except for dynamic
* import)

A few days ago, we found dynamic-imports compatibility error, so I tried to found more info about the difference bwtween build.target and @vitejs/plugin-legacy, and then found there are some conflict description.

The comment was added since 4 years ago, maybe it is outdated?

Reproduction

document & code comment

Steps to reproduce

No response

System Info

system independent

Used Package Manager

npm

Logs

No response

Validations

Activity

  1. sapphi-red commented on Dec 23, 2024

    @sapphi-red
    Member

    Yeah, the code comment is outdated.

  2. added
    documentation
    p1-chore
    and removed on Dec 23, 2024
  3. locked and limited conversation to collaborators on Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationp1-chore

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions