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

Terser sourcemap support #1195

Merged

Conversation

gregmagolan
Copy link
Collaborator

No description provided.

@@ -40,7 +40,7 @@ Can be a .js file, a rule producing .js files as its default output, or a rule p

Note that you can pass multiple files to terser, which it will bundle together.
If you want to do this, you can pass a filegroup here.""",
allow_files = [".js"],
allow_files = True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not continue to constrain it? do we no longer have a list of file extensions that should be legal?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be constrained to .js and .mjs and .map I suppose and that would be fine. Should I change it to that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it to that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

def _filter_js(files):
return [f for f in files if f.is_directory or f.extension == "js" or f.extension == "mjs"]

def _filter_sourcemap(files):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't feel like this function is carrying its weight, simple enough list comprehension to inline?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid point 🌮

@gregmagolan gregmagolan force-pushed the terser_sourcemap_support branch 2 times, most recently from fbb0b53 to 43bb384 Compare September 26, 2019 01:30
@gregmagolan gregmagolan merged commit d5bac48 into bazel-contrib:master Sep 26, 2019
Toxicable pushed a commit to Toxicable/rules_nodejs that referenced this pull request Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants