javascript - Automatic import or require based on file name being equal to folder name -


we use import many times way:

// file tree folder_name/   |__ index.js  // foo.js import foo './folder_name'  

however, index.js not descriptive @ , in ide see many index.js tab title hard know tab want open next. possible make import/require automatically load:

// file tree same_name_both/   |__ same_name_both.js  // foo.js import foo './same_name_both' 


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -