Skip to content

Inconsistent styling between build and watcher caused by Tailwind leakage from @git-diff-view/vue #1128

@fabianhueske

Description

Package

@meteor/component-library

Package version

No response

Browser

No response

Operating System

No response

Link to minimal reproduction

No response

Steps to reproduce

  1. Use the mt-text-editor component in a project.
  2. Ensure the diff view dependency (@git-diff-view/vue) is installed but not actively used.
  3. Start the app in watcher mode (Vite dev server).
  4. Observe styling of elements such as headings (h1h6) and spacings.
  5. Build the application for production and compare the styling.

Context: https://shopware-ag.slack.com/archives/CE2RGNMC6/p1776343752422469

Actual behavior

  • In watcher mode, global Tailwind styles from @git-diff-view/vue are applied.
  • These styles override our intended styles, for example heading font sizes and weights are set to inherit instead of semi-bold.
  • This leads to visible differences in typography and vertical spacing.
  • In production builds, these styles are not included due to Vite optimizations, resulting in different styling.

Expected behavior

  • Styling should be consistent between watcher mode and production builds.
  • External dependencies used by mt-text-editor should not leak global styles into the host application.
  • Styles should not be overridden unintentionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/highItems that we should do soon.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions