Skip to content

v2 addon by default#985

Open
NullVoxPopuli wants to merge 19 commits intoemberjs:mainfrom
NullVoxPopuli:v2-addon-by-default
Open

v2 addon by default#985
NullVoxPopuli wants to merge 19 commits intoemberjs:mainfrom
NullVoxPopuli:v2-addon-by-default

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Nov 2, 2023

@github-actions github-actions bot added the S-Proposed In the Proposed Stage label Nov 2, 2023
Co-authored-by: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com>
@ef4 ef4 added S-Exploring In the Exploring RFC Stage and removed S-Proposed In the Proposed Stage labels Apr 12, 2024
@kategengler
Copy link
Member

Would like to codify a testing story where Ember used as library without having to have a separate app.

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review July 2, 2025 16:06
Co-authored-by: Jon Johnson <jon.johnson@ucsf.edu>
@NullVoxPopuli
Copy link
Contributor Author

NullVoxPopuli commented Dec 16, 2025

TODO:

  • explain how to have a v2 addon in a monorepo that doesn't have a build -- an unpublished addon (exports etc changes)
  • sync with @ember/addon-blueprint
    • add information about the demo-app
    • explain compat-modules (pending bugfix in embroider)
      • for both demo app and test-app
    • explain when to think about importing from sub-path imports, vs importing "like a consumer would"
    • babel configs
    • remove resolve.alias from vite config
    • glint2 is no longer alpha
      • glint object in tsconfig no longer needed
      • remove glint imports from unpublished-development-types
  • move babel.config to esm
  • update eslint.config (RFC at the time of writing this comment is using a deprecated API)

Copy link
Member

@kategengler kategengler left a comment

Choose a reason for hiding this comment

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

I think generally the RFC needs more prose explaining the goals of the blueprint and less of the specifics of files.

It probably needs more of the documentation that we need to write anyway about how to use a v2 addon blueprint to build or upgrade an addon.


**V1 addons** get rebuilt by every consuming app, which is slow and couples addon builds to app builds.

**The original V2 blueprint** fixed the build problem but required a monorepo and manual configuration. It also lacked TypeScript/Glint integration and modern Ember patterns.
Copy link
Member

Choose a reason for hiding this comment

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

There was no RFC for this original v2 addon blueprint though, so I'm not sure it is worth mentioning here. The motivation is just to have a blueprint and make it the default.


### Migration

Existing addons are unaffected. New addons get the new blueprint automatically. Existing addons can migrate by generating a new project and copying relevant files, or using `npx ember-cli@latest addon <name> --blueprint @ember/addon-blueprint`.
Copy link
Member

Choose a reason for hiding this comment

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

Similar to the v2 app blueprint, this probably needs a plan for ember-cli-update to continue working (so we need to document how the blueprints to specify and probably store in the ember-cli-update config.

Will there be a codemod?

- Update the Ember Guides and CLI docs to reference the new blueprint
- The blueprint README covers customization, publishing, and multi-version support
- Provide migration guides for v1 and v2 addon authors

Copy link
Member

Choose a reason for hiding this comment

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

Blueprints are living. The specifics of files within this document may quickly become irrelevant. I think the RFC in general should talk more about the goals of those configurations than the details.

I also propose we add parallel .md files to the blueprint explaining config files and setup. Comments could also work but would potentially cause conflicts on updates. We could also offer and opt-out to not generate them.

Co-authored-by: Katie Gengler <katie@kmg.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-Exploring In the Exploring RFC Stage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants