question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: option to exclude some files

See original GitHub issue

It’ll be great if we could specify files to exclude. Currently, I get this warning WARNING in new Worker() will only be bundled if passed a String. because a dependency dynamically creates workers. But it’s not actionable from me because I don’t control this code.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:13

github_iconTop GitHub Comments

5reactions
s-h-a-d-o-wcommented, Apr 16, 2020

So far, it’s only been discussed that there is a warning and people want to get rid of it. What I’m more curious about is - it’s a warning, so what are the potential issues? Personally, I don’t get why worker-plugin tries to bundle workers of third party libraries in the first place. I would’ve assumed that that’s already taken care of within the library…

2reactions
developitcommented, May 3, 2020

@s-h-a-d-o-w it’s not really feasible to define what constitutes a third-party library. Things from node_modules could be relying on new Worker('..', {type:'module'}), and this plugin would make them function correctly. Some folks “vendor” their dependencies so they’re not in a directory like node_modules that could be reasonably excluded by default.

At the end of the day, it’s fairly confusing to apply transformations like this only to certain code. This plugin implements a web standard at build time, so it should be pretty safe to run on all code.

In terms of any ill-effects related to the warning, it’s really there for the opposite reason: the warning points out failed cases where folks do want WorkerPlugin to bundle a Worker, where static analysis bails out and it can’t figure out the worker’s entry module:

import workerSrc from './somewhere-else';
new Worker(workerSrc, { type: 'module' });

The warning points out these cases because they’re likely errors in first-party code.

That all being said, I do think the warnings are too aggressive right now. Currently, any usage of new Worker() will trigger the warnings - that’s a little much, since even non-module workers will trigger it, and they aren’t even supported by the plugin. I’ll open a PR to make it so that only module workers receive warnings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OnceDrive - Feature request for files / folders exclusion
I raised an issue to Microsoft support for exclusion of folders / files to sync and was advised to raise a feature request...
Read more >
Ability to Ignore Development Files From Syncing
The ability to exclude/ignore files used only for development would be a welcome addition. Giving the option to ignore items such as dot...
Read more >
Exclude files from pull request diffs | Bitbucket Cloud
Exclude files from appearing in the diff view of a pull request in Bitbucket Cloud by specifying patterns in the 'Excluded files' repository...
Read more >
Feature request - exclude directories from backup
Hello and Welcome to Veeam Community, You could manually exclude any directory by going to file level backup mode and unchecking the annoying ......
Read more >
Feature request: Exclude file types from indexing - Feedback
I have seen a couple of questions in the forum. But, I think there is no easy way to exclude some types from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found