I got confused with folder structure and the way i...
# suitecommerce
s
I got confused with folder structure and the way it imports template. I observed that in productdetails module,there is a folder named templates which have template files of productdetails module with. Ts extension. While the home module doesn't contain such type of folder. Moreover the import paths are also different in both modules. Can someone tell how both of these works ?
@Steve Goldberg @Flo @PabloZ @TheAntman can someone guide me on this topic ?
p
Sorry, i'm not that familiar with 19.2 yet
On first sight, as you point out, the templates folder exists in some modules but no others. That contains not the templates themselves, but the templates type definition. (.d.ts) files which all export exactly the same.
s
@PabloZ thanks. But there is no such type definition file for home module,but still its working, how ?
p
In reality the templates are not injected there. Templates get compiled by a totally different process in the form of the Extension (and Theme) Manager.
Some magic in gulp SC_19.2_Live/gulp/tasks/javascript.js task parses the requires for .tpl files and decides what to do.