Skip to content

vite w/ type=module#1200

Draft
NullVoxPopuli-ai-agent wants to merge 11 commits intoember-learn:mainfrom
NullVoxPopuli-ai-agent:vite-type-module
Draft

vite w/ type=module#1200
NullVoxPopuli-ai-agent wants to merge 11 commits intoember-learn:mainfrom
NullVoxPopuli-ai-agent:vite-type-module

Conversation

@NullVoxPopuli-ai-agent
Copy link
Copy Markdown

Summary

  • Convert build system from ember-cli to Vite 8 via ember-vite-codemod
  • Add "type": "module" to package.json
  • Use ember-strict-application-resolver with import.meta.glob() for module registration
  • Use @embroider/router for routing
  • Remove ember-cli-build.js and @embroider/compat
  • Replace broccoli-based content-data-generator with scripts/generate-content.mjs
  • Custom vite plugin resolves @ember/* and @glimmer/* virtual modules from ember-source
  • Upgrade @glimmer/component to v2, ember-data to 5.8, @ember/string to v4

Removed v1 addons (need separate v2 conversion PRs)

Addon Replacement
ember-styleguide Needs v2 addon conversion PR
ember-leaflet ember-maplibre-gl
ember-responsive-image @responsive-image/ember
ember-tether ember-primitives (floating-ui)
ember-cli-fastboot / prember (SSR removed for now)
ember-cli-head (removed, was for fastboot)
ember-body-class ember-primitives body class
ember-metrics (removed, can use GA directly)
ember-href-to (was unused in app code)
ember-cached-decorator-polyfill (Ember 5.12 has native @cached)
ember-cli-babel-polyfills (vite handles this)
ember-a11y-testing (peer dep conflict with @ember/test-helpers v5)

Added dependencies

  • ember-primitives - modern UI primitives
  • ember-strict-application-resolver - explicit module registration
  • @embroider/router - vite-compatible router
  • testem - direct test runner (no ember-cli)

Follow-up work

  • PR to convert ember-styleguide to v2 addon (via ember-cli/ember-addon-blueprint)
  • Migrate map from ember-leaflet to ember-maplibre-gl
  • Migrate images from ember-responsive-image to @responsive-image/ember
  • Replace ember-tether usage with ember-primitives positioning
  • Re-add analytics (replace ember-metrics with direct GA or alternative)
  • Re-add SSR/pre-rendering if needed
  • Update CI workflow for vite build

Test plan

  • vite build succeeds (371 modules transformed)
  • vite dev server starts and pages render
  • Tests pass with vite build --mode development && testem ci
  • Verify content data generation works correctly
  • Visual check of rendered pages

🤖 Generated with Claude Code

NullVoxPopuli and others added 3 commits March 28, 2026 22:10
- Run ember-vite-codemod as starting point
- Remove ember-cli-build.js and @embroider/compat
- Add "type": "module" to package.json
- Use ember-strict-application-resolver with import.meta.glob for module registration
- Use @embroider/router for routing
- Replace broccoli-based content-data-generator with scripts/generate-content.mjs
- Custom vite plugin to resolve @ember/* and @glimmer/* virtual modules from ember-source
- Upgrade to vite 8, @glimmer/component 2, ember-data 5.8, @ember/string 4

Removed v1 addons (need separate v2 conversion PRs):
- ember-styleguide (UI components - needs v2 conversion)
- ember-leaflet (replace with ember-maplibre-gl)
- ember-responsive-image (replace with @responsive-image/ember)
- ember-tether (replace with ember-primitives positioning)
- ember-cli-fastboot / prember / ember-data-fastboot (SSR)
- ember-cli-head, ember-body-class, ember-metrics
- ember-href-to, ember-cached-decorator-polyfill
- ember-cli-babel-polyfills, ember-cli-netlify

Added:
- ember-primitives
- ember-strict-application-resolver
- @embroider/router

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 29, 2026

Deploy Preview for ember-website ready!

Name Link
🔨 Latest commit 315f3cf
🔍 Latest deploy log https://app.netlify.com/projects/ember-website/deploys/69c9214393e9bb0008f92911
😎 Deploy Preview https://deploy-preview-1200--ember-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread package.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is probably the most important part to focus on while I iterate on the what the bot thinks is correct 🙈

NullVoxPopuli and others added 3 commits March 28, 2026 23:09
ember-a11y-testing@8 is a v2 addon and works without @embroider/compat.
Restores all a11yAudit calls in test files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Provided by ember-source via the ember() vite plugin.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NullVoxPopuli NullVoxPopuli marked this pull request as draft March 29, 2026 03:13
NullVoxPopuli and others added 5 commits March 29, 2026 00:00
- Add configFile: false to eslint babel parser to prevent auto-discovery
  of babel.config.mjs (which has async plugins)
- Rename config/environment.js to .cjs for type=module compat
- Fix blueprint glob patterns in eslint config
- Remove @percy/ember imports from tests (v1 addon, removed)
- Remove unused parseNestedValue function
- Add hbs() plugin for .hbs template compilation
- Add emberSourceResolver plugin to resolve @ember/* and @glimmer/*
  virtual modules to ember-source/dist/packages/
- Configure WarpDrive global config for @embroider/macros compilation
- Two babel passes: full pass (excluding @warp-drive) + macros-only for @warp-drive
- All @embroider/macros calls now compiled away (0 runtime fallbacks)

Test results: 205 tests, 67 pass, 138 fail
(failures expected - removed ember-styleguide components, percy, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… vite config

- Replace manual WarpDrive macros config with setConfig() from @warp-drive/build-config
- Remove custom compileMacrosInEmberSource plugin and second babel pass
- Copy .netlifyheaders/.netlifyredirects to public/ as _headers/_redirects
  (previously handled by removed ember-cli-netlify addon)
- Simplify vite.config.mjs — single babel pass handles all macros
- All @embroider/macros calls properly compiled away (0 runtime references)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add exclude pattern to babel plugin to prevent recompiling pre-built
  v2 addon dist files (only ember-source is included for macros)
- Use @warp-drive/build-config setConfig() for proper WarpDrive macros
- Copy Netlify _headers/_redirects to public/ directory
- ember-styleguide v2 blocked: its dist uses @ember/template-compiler
  which requires ember-source 6.x (not available on 5.12)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add ember-styleguide from git ref (NullVoxPopuli-ai-agent/ember-styleguide#convert-to-v2-addon)
- Register ember-styleguide services (navbar, progress) in app.js
- Restore EsHeader/EsFooter in application.hbs
- Add @ember/test-waiters and ember-concurrency as dependencies
- Fix babel filter to use function-based ID matching for pnpm deep paths
  (regex-based exclude doesn't work with pnpm's nested node_modules)
- Process @ember/test-waiters through babel for macros compilation
- All @embroider/macros compiled away in both production AND development builds

Tests: 68/205 pass (remaining failures from removed v1 addons like
ember-leaflet, ember-responsive-image, and percy)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Netlify needs explicit configuration to use pnpm (via corepack)
and to publish the dist/ directory from the vite build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants