html-loader allows us to import HTML files like this:
import AccountEditView from "accounts/views/edit.html";
html-loader@2.x defaults to esModule: true, which causes ngtemplate-loader to throw an error:
WARNING in ./src/accounts/controllers/index.ts 26:25-40
export 'default' (imported as 'AccountEditView') was not found in 'accounts/views/edit.html' (module has no exports)
@ ./src/accounts/index.ts 7:0-57 17:42-64
@ ./src/loot/index.ts 6:0-18
As a workaround, we simply set esModule: false on html-loader; but it would be nice if we didn't have to do this and could use the default settings.
html-loader
allows us to import HTML files like this:html-loader@2.x
defaults toesModule: true
, which causesngtemplate-loader
to throw an error:As a workaround, we simply set
esModule: false
onhtml-loader
; but it would be nice if we didn't have to do this and could use the default settings.