Unbundle external dependencies from web part bundle
By default any dependencies you add gets bundled into the web part bundle. While this could be true for some cases, it is not ideal. Hence you can choose to unbundle these dependencies from the web part bundle.
In Visual Studio Code, open the file config\config.json
This config.json contains information about your bundle(s) and any external dependencies included.
The entries region contains the default bundle information which in our case is the jQuery web part bundle. You will see one entry per web part once you add more web parts to your solution.
The externals section contains the libraries information that are not bundled with the default bundle. As you can see, we have a few by default.
In order to exclude jQuery and jQueryUI from the default bundle, we add the modules respectively to the externals section:
Now when you build your project, jQuery and jQueryUI will not be bundled into your default web part bundle
Reference: jQuery accordion webpart