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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -