Skip to content

bug: Re-minifying the language service worker breaks JSON Schema diagnostics #489

Closed

Description

@fantonangeli

Describe the Bug

JSON Schema diagnostics fail in the production build of the vanilla Web Component PoC when the consuming application minifies the already-minified Text Editor language service worker.

The JSON language service throws:

Language service plugin "json" failed to provide document feature:
TypeError: Cannot read properties of undefined (reading 'include')

The exception is caught and diagnostics return an empty array, leaving invalid workflows without schema warnings. JSON syntax errors can still produce squiggles, making the failure less obvious.

Steps to reproduce

  1. Build examples/vanilla-web-component for production, minifying the worker again, using this DO NOT MERGE - fix #380 - poc: Validate Text Editor and Language Service in vanilla Web Component #488
pnpm --filter @openworkflowspec/vanilla-web-component-example build:prod
  1. Serve the production build and open this workflow:
cd examples/vanilla-web-component
npx http-server dist
{
  "document": {
    "dsl": "1.0.3",
    "namespace": "examples",
    "name": "hello-world",
    "version": "0.1.0"
  },
  "do": [{
    "greet": {
      "call": "http",
      "wrong": {
        "method": "GET",
        "endpoint": "https://httpbin.org/get"
      }
    }
  }]
}
  1. Observe that schema diagnostics are missing and the worker reports the exception above.

Expected Behavior

Production builds provide JSON Schema diagnostics consistently with development builds, including warnings for the invalid wrong property and missing required properties.

Editor Version

Local Text Editor build used for PoC #488.

Platform

Web / Browser

Additional Context

Discovered while validating #380 and reproduced in the GitHub Pages deployment. Local development server was not affected.

Setting build.minify: false in packages/text-editor/vite.config.ts, leaving minification to the consuming application, restored schema diagnostics in production.

This is the current PoC workaround. The underlying minifier transformation still needs investigation.

Activity

  1. self-assigned this
    on Oct 15, 2026
  2. added theissue type on Oct 15, 2026
  3. moved this from Backlog to In Progress in Editor Project Trackeron Oct 20, 2026
  4. added a commit that references this issue on Oct 28, 2026
    54b909f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions