From 67c7101517f1c4dd79be874e22052fb77f528da0 Mon Sep 17 00:00:00 2001 From: Alex Matchneer Date: Sun, 4 Feb 2024 08:51:51 +0800 Subject: [PATCH] README: add note about V2 addons --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aa1b49..c456399 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,16 @@ Provides flags for features in Ember, allowing you to write code that will work with whatever version the consuming application is on. This addon is intended -to help addon authors write backwards/forwards compatibility code. +to help V1 addon authors write backwards/forwards compatibility code. The flags are replaced at build time with boolean literals (`true` or `false`) by a Babel transform. When ran through a minifier (with dead code elimination) the entire section will be stripped, meaning that the section of code which is not used will not be added to production builds - zero cost compatibility! +### Note for V2 Addons + +This package should not be used within [V2 Addons](https://rfcs.emberjs.com/id/0507-embroider-v2-package-format/). Instead, please use [`@embroider/macros`](https://github.com/embroider-build/embroider/tree/main/packages/macros), which provides a very similar API to `ember-compatibility-helpers`. + ## Installation ```