Using PCUI with TS template

I’m trying to bundle project from the outside of studio editor and push it to studio via pcsync.
And most of the files are converted to TS.
TS compiling and bundling works fine.
However, I’m having a problem to integrate it with pcui because.
I’ve created a umd version of PCUI and added it to “include” directive of tsconfig.json

The bundling works also fine, but it failed to parse from the studio.
It says “document” is not defined.

Is there any other way to use PCUI with typescript template?