Hi, i have the following ES6 statement in a .js file(within vue.js project that uses webpack):
import my_value from 'path_to_folder1/folder2'; //after `from` keyword, I don't include index.js.
The above statement will be run in this first two steps:
step 1) webpack transpiles ES6 import syntax to require syntax,
for example:
import my_value from 'path_to_folder1/folder2';
will be transpiled to:
var my_value = require('path_to_folder1/folder2');
step 2) node.js will search and load (by default) an index.js file from folder2 folder.
step 3) is a node.js feature to default search and load index.js file, from a folder, in a require statement? is there any official documentation on this?
Can you tell me if first two steps are correct?
Then, I would like an answer for the step 3.
It's important. Thanks