Skip to content

[WIP] Add @mendix/vite-config-widgets-web package#169

Open
iobuhov wants to merge 13 commits intomendix:masterfrom
iobuhov:vite-config
Open

[WIP] Add @mendix/vite-config-widgets-web package#169
iobuhov wants to merge 13 commits intomendix:masterfrom
iobuhov:vite-config

Conversation

@iobuhov
Copy link
Contributor

@iobuhov iobuhov commented Mar 12, 2026

Summary

  • Add new @mendix/vite-config-widgets-web package for building Mendix web widgets with Vite
  • Configure package for npm publishing with proper exports and entry points
  • Add comprehensive README with usage examples for npm package consumption
  • Implement integration tests to verify end-to-end functionality
  • Simplify MPK build process with single staging directory

Key Features

  • Programmatic Vite configuration via createWidgetViteConfig()
  • Support for development and production build modes
  • MPK artifact generation with proper staging
  • Integration tests that verify the package works when installed from npm

Changes

  • Created new package structure with config, build, and helper modules
  • Added build script using esbuild for package compilation
  • Configured package.json with proper exports for ESM consumption
  • Cleaned up README to remove outdated monorepo references
  • Fixed MPK build path to use single dist/tmp/widgets staging directory
  • Added integration test suite with test widget and automated verification

Test Plan

  • Integration tests pass: pnpm test:integration
  • Verify package can be installed from npm after publishing
  • Test programmatic usage in a real widget project
  • Verify both dev and prod build modes produce correct artifacts
  • Check MPK generation and structure

🤖 Generated with Claude Code

iobuhov and others added 8 commits March 11, 2026 16:04
…tor package

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Samuel Reichert <samuelreichertt@gmail.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add integration test suite with test widget and runner
- Simplify MPK staging to use single dist/tmp/widgets directory
- Update package name to @mendix/vite-config-widgets-web
- Add test:integration script and premove dependency
- Add test/results to gitignore

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@iobuhov iobuhov requested a review from a team as a code owner March 12, 2026 10:25
@iobuhov iobuhov changed the title Add @mendix/vite-config-widgets-web package [WIP] Add @mendix/vite-config-widgets-web package Mar 12, 2026
iobuhov and others added 5 commits March 12, 2026 11:38
- Add widget-typings-generator as workspace dependency
- Add prepack script to bundle typings generator with esbuild
- Add build:typings script to build generator before bundling

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add vite-plugin-widget-typings that generates typings from package.xml
- Add sourceDir to ResolvedConfig type
- Import and use widget-typings-generator at build time

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add .gitignore to exclude dist, node_modules, and test/results
- Remove test/results from git tracking
- Add verification for generated TypeScript typings file
- Fix test widget package.xml to use correct widget path
- Update typings plugin to warn on errors (except ENOENT)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ion test

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…and visibility

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants