Skip to content

Prevent application startup if webpack config file is present while running with Vite #14417

Closed

Description

@taefi

Describe your motivation

As of V23.2, the default frontend build tool is changed to Vite (and webpack is only available behind a feature flag).
Applications migrating from earlier versions normally have the legacy webpack.config.js, should be notified about the fact that any webpack configuration will not be picked by Vite.

Describe the solution you'd like

To prevent confusion and misconfiguration, a runtime exception should prevent application startup if webpack.config.js exists in the project and it contents are different from the default that is created by Vaadin. The exception message should clearly ask the user to either:

  • Migrate any custom webpack configs to Vite alternatives and remove the webpack.config.js to be able to run the application with Vite.
  • Reactivate the webpack with its associated feature flag to continue running the application with webpack.

If the webpack.config.js exists but the contents were the autogenerated content by Vaadin, only WARN the user about its existence and don't prevent the application startup.

Activity

  1. added a commit that references this issue on Aug 23, 2022
    dff1ee8
  2. self-assigned this
    on Aug 23, 2022
  3. added
    viteTickets related to vite support
    on Aug 23, 2022
  4. added a commit that references this issue on Aug 30, 2022
    89836c5
  5. vaadin-bot commented on Sep 7, 2022

    @vaadin-bot
    Collaborator

    This ticket/PR has been released with Vaadin 23.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions