Does Meteor Really Support CSS Import?


#1

Hi,
I know we can dynamically import files on meteor now. Meteor TODO example showed it too. https://github.com/meteor/todos

I have a question regarding the dynamically import on CSS files. Does meteor really support dynamically import CSS? It can somehow import but will not get updated when nav to next page.
For example in below project structure(files are in imports folder):
-todo
–todo.html
–todo.js
–todo.scss
-details
–details.html
–details.js
–details.scss

If I import todo.scss in todo.js, todo.scss will be loaded to the html head tag dynamically. But now the issue is when I navigate to details page. todo.scss is still in the head tag. Is it as expected? I am using Iron router not flow router here.


#2

You need to move things into imports directory for the dynamic imports to take effect.


#3

Hi @storyteller
I have put files in imports folder. Like I said, it is taking effect. The problem is after you nav to details page from to-do page, imported todo CSS is not removed from the head tag.


#4

Hi @sashko @tmeasday
Would you help us answer this question please?