JavaScript Dynamic Imports are a relatively new feature of JavaScript. They let you load modules from a folder without having to know the name of the folder. But doing something like importing test from folder doesn't work. You need to do a dynamic import, in this way:const test = await import ( folder + '/test.js' )
3 Comments
Sort: