It will not keep any of your current modifiers! Note, however, that any modification of existing legendary pieces will replace your current modifiers! So don't go doing this on a bloodied explosive less vats fixer for example. Alternatively you can mod an existing legendary piece into a new one with one, two or three stars. You can create a new piece of weapon/armor (including power armor) or use an existing piece of weapon/armor and then go to a workbench, switch to modify, and then mod that piece into a one star, two star, or three star legendary piece.
Legendary cores are a new component in the game that allow you to modify weapons and armor into legendary versions of that weapon and armor. I copied my guide to help people out on the Windows 10 version. Note: I unlocked this on the Xbox One version of the game which is why I don't have it showing as unlocked here.