Don't work on the project for your employer. Explain the situation to them, and tell them you cannot work on that project for them. Then offer to license the work done to them or their client for a fee.
If the employer won't buy any of this, get another job. There's no point in giving away something you worked hard on so someone else can profit from it.
Don't work on the project for your employer. Explain the situation to them, and tell them you cannot work on that project for them. Then offer to license the work done to them or their client for a fee. If the employer won't buy any of this, get another job. There's no point in giving away something you worked hard on so someone else can profit from it.