register extensions given in opts

this also fixes the bug that it's impossible to register extensions when opts.watch is true