Is it possible to load an html file in typescript as a variable?

I use webpack and typescript. Can I load an html file as a variable? Sort of:import myTemplate from './template.html';

+4
source share
1 answer

Use the raw-loader webpack loader, and if you import through import myTemplate from './template.html', it should work.

0
source

Source: https://habr.com/ru/post/1667292/


All Articles