ai / size-limit

Calculate the real cost to run your JS app or lib to keep good performance. Show error in pull request if the cost exceeds the limit.
MIT License
6.52k stars 1.82k forks source link

enable experiments in webpack config #282

Closed opeologist closed 2 years ago

opeologist commented 2 years ago

i have enabled the use of topLevelAwait in my "big lib" that i'd like to use the preset for, but upon attempting to have the preset's webpack app use the bundle, it immediately fails saying topLevelAwait isn't enabled

is there some way to customize the webpack config that's used for that preset that i'm not aware of? thanks!

ai commented 2 years ago

Yes, there is modifyWebpackConfig function in config (you need use JS version of config) where you can modify webpack config.

Also you can use config option to set path to new webpack config.