scottohara / loot

An implementation of some of the core MS Money features in Ruby on Rails
MIT License
4 stars 3 forks source link

ngtemplate-loader doesn't support esModule option #186

Open scottohara opened 2 years ago

scottohara commented 2 years ago

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.