javascript - Meteor import all files in a directory -
i'm having issue while trying import files in 1 of directories.
this works:
import '../pages/guidance/target_access_client_relationships.js';
while doesn't:
import '../pages/guidance';
what doing wrong? planning have quite lot of files in 'guidance' , i'd rather not have import every single file individually.
thanks!
the way know use index.js
, import file inside it.
ex:
dir index.js import './filea.js' import './fileb.js' dir b index.js import './filea.js' import './fileb.js'
and can make parent dir , import both
parent dir index.js import './dirb' import './dira'
Comments
Post a Comment