Personally, I just have a simple bash script that copies all of the files to different build folders for each browser and then deletes any browser-specific files.
For example, I have manifest-firefox.json and manifest-chrome.json. After everything is copied (let’s say, for Chrome), the Firefox file is deleted from the build folder and the chrome one is renamed.
I’m sure there’s better ways, but it works for me. Most of the code between the two browsers is the same. For any JavaScript that’s not, you can easily tell what browser you are on by checking if the “browser” variable is defined. If it’s not, you’re on Chrome. You can then just assign "browser’s to “chrome” and that works for many of the API calls.
The polyfill library is also an option, but I’ve never personally used it.
As for CSS, 99% of the CSS should work on both browsers. If you need to use CSS with a vendor prefix, you can just add it in. Firefox will ignore it.