ember-cli / ember-cli/babel-plugin-debug-macros
Strip import statement if all imports are removed.
Open
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Currently, given:
```js
import { SOME_FLAG } from 'blah/features';
if (SOME_FLAG) {
console.log('whatever');
}
```
With this config:
```js
{
plugins: [
['babel-debug-macros', {
features: {
name: 'blah',
source: 'blah/features',
flags: { SOME_FLAG: true }
},
}]
]
}
```
We remove the usage of `SOME_FLAG`, but leave the import statement. This forces us to also emit a `blah/features` module even if we never have runtime enableable features.
IMO, we should remove imports if they are no longer used...
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.