Compiles templates from HTML files with script tags to CommonJS modules