Library component scripts not running after import

I created a component that uses scripts. I then published that component as a library and imported the component into another file. However the scripts don’t seem to run in the new file.

Is it expected that scripts don’t carry over when a component is imported from a library? Or is there a way to make the scripts work without having to also manually import and place them again?