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

Strip comments #1

Open
rstacruz opened this issue Aug 20, 2018 · 1 comment
Open

Strip comments #1

rstacruz opened this issue Aug 20, 2018 · 1 comment

Comments

@rstacruz
Copy link

This is a very interesting concept!

It seems to report some modules as "Failed to treeshake" because, they will include some comments:

/* global HTMLElement */

// @flow

// @flow

Failed to tree-shake index.js

This example in particular is pretty common. If I use this file, the comment will be printed out:

/*
 * I am a comment that will be included.
 */

export function xyz () {
  // ...
}
@funkybob
Copy link

I've noticed, also, that it's only comments starting on the very first line of a file.
I inserted a blank line at the start of the files, and the comments were stripped.

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