Feature request: option to exclude some files
See original GitHub issueIt’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:
- Created 5 years ago
- Reactions:17
- Comments:13
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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…@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 likenode_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:
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.