I found the answer. I have to include it in the elements.xml as normally.
<Module Name="Files" Url="SiteAssets">
<File Path="test.js" Url="test.js" Type="GhostableInLibrary" ReplaceContent="TRUE" >
Then reference the file in package-solution.json:
Finally, I have to extract the package using WinRar or something and include the js extension in the [Content_Types].xml (If the extension has already been here then you dont have to do this step. Right now it has .jpg, .pnp, .gif, .xml, .rels, .webpart, .htm, .aspx, .resx)
<Default Extension="js" ContentType="application/wsp"></Default>
Trying to figure how to include js extension by default using gulp package-solution. Really hope MS will do this later instead of leaving out the .js (and .css) files