Make sure to CSPify main document first, load platform.js first in the output js file.