How to not have a component add to an object during build time

I’d like to know if anyone has figured out a way to not compile a script or not have it be included on every object in game that has it. (Yes, this is hard to explain, the example should help)
Example:
I have a note.cs monobehavior that simply has a public string variable. This component acts like a comment that is added to many objects in the game. Building the game doesn’t require that these components be on these objects, so it may save a bit of memory to not have these extra components. I would prefer a solution that doesn’t involve removing the script at runtime.

(I tried the “NotConverted” attribute but it didn’t seem to make a difference)

you might try some conditional compilation

#if UNITY_EDITOR
// code you only want included int the editor
#endif