bundledWebRuntime: true not including plugins in v3 and v4

How do you make sure the bundledWebRuntime instruction creates a capacitor.js file that includes all plugins you use in your project? We don’t use a bundler just plain old Javascript. Worked great in v2 but now when we updated to Capacitor v4 we got this problem with the plugins not included in the generated capacitor.js file. It’s funny that it’s not mentioned anywhere in the documentation on how to go about doing this, we have also searched all places for an answer but no one seems to have received an answer even if the question has been asked in numerous places. We have of course installed and added all needed node modules for the plugins. We just need a “simple” way to package it all up in one JavaScript file to be included in the index.html file.