Closed gnowth closed 7 years ago
Why was this one closed? It's still a thing, especially in Meteor
projects. Where we need to import templates with import './Dialog.html'
.
As a workaround, we can use import template from './Dialog.html'
, but good coding standards will complain about template is defined but not being used
.
So what I'm currently doing, but not really liking; is that I have two type of html
files. Meteor templates have an .html
extension, while inline-imported
files use .htm
. Combined with a .babelrc
that only looks for .htm
files, it works. But it ain't pretty.
importing a file without assigning it to a variable causes an error
TypeError: Cannot read property 'local' of undefined