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: Override wildcards with specific settings

See original GitHub issue

Do you want to request a feature or report a bug?

Feature: Allow overrides to rules specified by wildcards with more specific rules

For the configuration below I would like anything matching ./public/webpack/vendor-*.js to have the limit of 300kb and everything else in ./public/webpack/**/*.js to use the limit of 150kb.

{
  "files": [
    {
      "path": "./public/webpack/vendor-*.js",
      "maxSize": "300 kB",
      "priority": 10
    },
    {
      "path": "./public/webpack/**/*.js",
      "maxSize": "150 kB"
    }
  ]
}

What is the current behavior?

Right now ./public/webpack/vendor-*.js would be in the results twice and fail due to the lower 150kb limit applied to ./public/webpack/**/*.js.

If the current behavior is a bug, please provide the steps to reproduce.

Not a bug 😉

What is the expected behavior?

The configuration would pass with only one reference to ./public/webpack/vendor-*.js.

If this is a feature request, what is motivation or use case for changing the behavior?

Our bundle is currently much too large and we want to make it smaller. This work will take a long time and need multiple teams. While we are working to make the extremely large files smaller, we would like to enforce a more strict limit on new files. As the large files are improved, we can remove the overrides.

Please mention other relevant information.

  • node version: 8.16.0
  • npm version: 6.4.1
  • Operating system: mac
  • bundlesize version: 0.18.0
  • CI you are using: Drone

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
siddharthkpcommented, Apr 7, 2020

This has been fixed in the beta channel in https://github.com/siddharthkp/bundlesize/pull/324. If you aren’t using the github integration, you can start using beta

Read more comments on GitHub >

github_iconTop Results From Across the Web

Odd parameter overrides' ordering when using wildcards #953
I'm not sure if we've ever fully specified behavior when using wildcards. If wildcards have lower precedence than fully qualified names, command ...
Read more >
using wildcards in java method overrides - Stack Overflow
Most of the examples of generics and wildcards involve collections but I am trying to learn how to use them just with classes....
Read more >
Using wildcards | CodeTwo Exchange Rules Pro User's manual
In CodeTwo Exchange Rules Pro, wildcards may be used to: define phrases,; define email addresses. Each usage types defined above are limited to...
Read more >
Use wildcards in queries and parameters in Access
Match all characters anywhere in your data. Open your query in Design view. To do so, in the Navigation pane, under Queries, right-click...
Read more >
Advanced Find & Replace with wildcards in Microsoft Word
How to use wildcards in find and replace in microsoft word.
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