Does import de-duplicate (js AND html)?

It’s possible to import js and also html files with 1.3.2. I think now it’s also possible to import other files such as css, scss, etc.

I’m not sure if the import syntax actually deduplicates files. Before when using html imports it would be done by the browser by default. I’m considering using meteor’s import syntax for html imports (faster and nicer to write imo) but I’m not sure if this actually deduplicates the files.

Yes, I’m pretty sure any module you load is only included once, and then you get a reference to the same object if you import it somewhere else. Otherwise it wouldn’t be a module system!

1 Like