Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use with es6 imports?; #1

Open
Akiyamka opened this issue Mar 15, 2019 · 1 comment
Open

how to use with es6 imports?; #1

Akiyamka opened this issue Mar 15, 2019 · 1 comment

Comments

@Akiyamka
Copy link

in case

import debug from 'debug';
const log = debug('SeparatedLayers:');

plugin deleted only const log = debug('SeparatedLayers:'); string, but all calls of log still in production code (and crush with log is not defined)

@darrachequesne
Copy link

For future readers, a possible workaround is to add debug() on the lines you want to remove:

import debugModule from 'debug'; // debug()

const debug = debugModule("mydebug"); // debug()

debug("hello!");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants