Skip to content

Commit 84c0803

Browse files
committed
Add note about production
1 parent 3eff44c commit 84c0803

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,19 @@ By default, production ember-cli builds already remove deprecation warnings. Any
114114
deprecations configured to `throw` or `log` will only do so in non-production
115115
builds.
116116

117-
### Enable / Disable through configuration
117+
### Enable / Disable
118118

119-
If your app has disabled test files in development environment you can force enabling this addon through configuration in `ember-cli-build.js` instead:
120-
```javascript
121-
'ember-cli-deprecation-workflow': {
122-
enabled: true,
123-
},
119+
inclusion of `ember-cli-deprecation-workflow` is controlled by imports, so if there is an environment that you wish to disable `ember-cli-deprecation-workflow` in, that can be controlled via `@embroider/macros` conditions
120+
121+
```js
122+
// app.js
123+
import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros';
124+
125+
// Will only import your deprecation-workflow file while isDevelopingApp is true
126+
// and will be stripped from your build if isDevelopingApp is false
127+
if (macroCondition(isDevelopingApp())) {
128+
importSync('./deprecation-workflow.js'),
129+
}
124130
```
125131

126132
### Catch-all

0 commit comments

Comments
 (0)