是否可以将html文件作为变量加载到typescript?
我正在使用网页包和打字脚本。 是否可以将html文件作为变量加载?是否可以将html文件作为变量加载到typescript?,typescript,webpack,Typescript,Webpack,我正在使用网页包和打字脚本。 是否可以将html文件作为变量加载? 类似于:importmytemplate from./template.html'使用网页包加载器,如果您通过从“/template.html”导入myTemplate,它应该可以工作。您可以像其他文件一样加载html文件吗?e、 g.fs.readFile(…)
类似于:
importmytemplate from./template.html'
使用网页包加载器,如果您通过从“/template.html”导入myTemplate,它应该可以工作。您可以像其他文件一样加载html文件吗?e、 g.fs.readFile(…)