I can not find this kind of settings in Charles "Record Settings" dialog.
Go to Record Settings>Include>add
In 'Add' in the path field type in *.js
This should filter the recording to just .js files. You can do the same for css files.