Conversation
Co-authored-by: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com>
|
Would like to codify a testing story where Ember used as library without having to have a separate app. |
Co-authored-by: Jon Johnson <jon.johnson@ucsf.edu>
|
TODO:
|
kategengler
left a comment
There was a problem hiding this comment.
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.
| - 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 | ||
|
|
There was a problem hiding this comment.
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.
text/0985-v2-addon-by-default.md
Outdated
| └── addon-main.cjs # V1 compat shim | ||
| ``` | ||
|
|
||
| **Why single-package by default**: Most addons don't need a monorepo. Single-package is simpler to maintain and publish. Advanced users can still set up monorepos. |
There was a problem hiding this comment.
Without context, this argument only makes sense if you were around for the iteration of the v2 addon.
|
if we add an export for |
Local addons that don't need a build of their own are a legit use case, but it definitely needs to be distinct from the defaults for a publishable addon. They want to be quite different. It's either a flag or an entirely different blueprint. In particular, a non-built addon should drop a huge chunk of all the devDeps.
Unfortunately package.json exports rules don't allow any fallbacks, so if you put |
|
RFC should probably explain what to do about in-repo addons. You can make v2 ones, if you use your package manager to establish them as real package dependencies. They probably want to be "unbuilt" ones. |
should we just use an alias in vite config to point addon name imports to the source files? |
Co-authored-by: Alex <void-mAlex@users.noreply.github.com>
- Add note about addon/app blueprint parity gap in Motivation (kategengler) - Expand "Why single-package" with historical context about the earlier monorepo-based v2 blueprint (kategengler) - Document ember-cli-update version boundary for v1-to-v2 migration (kategengler) - Add section on ember-cli generators not working in v2 addons and what addon authors should do instead (kategengler) - Add bullet about reviewing existing Guides for incompatible workflows Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…iew-comments Address review comments on RFC emberjs#985
Address ef4's review comment that the RFC should explain what to do about in-repo addons. They can be converted to v2 by establishing them as real package dependencies via workspace features, and they'll typically be "unbuilt" addons pointing exports at source files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dons Add in-repo addons migration path to RFC emberjs#985
The blueprint should support a flag (e.g. --no-build) for generating simpler addons intended for local/workspace use. These skip the publish build, point exports at source, and drop unneeded devDependencies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add non-built addon flag to Detailed design
|
|
||
| ### Non-Built Addons | ||
|
|
||
| The blueprint should support a flag (e.g. `--no-build`) that generates a simpler addon intended for local/workspace use rather than publishing to npm. A non-built addon skips the publish-time build entirely -- `exports` points at source files, and the consuming app's build tooling (Vite/Embroider) handles transpilation. |
There was a problem hiding this comment.
NOTE: ember-cli currently does not like when addons specify custom arguments, and prints a warning whenever they are used.
This should be fixed in ember-cli, as we've needed this (and used this) behavior in blueprints for several years now.
Not a blocker for this RFC
There was a problem hiding this comment.
iirc that is a side effect of whatever ember-cli is using for arguments; I agree we should fix it but blueprint flags do need to be "known" by ember-cli-update, at least.
There was a problem hiding this comment.
they're only "known" at all because of what's in the ember-cli-update.json, yea?
rendered