S
S
squadbrodyaga2021-01-15 16:41:28
Node.js
squadbrodyaga, 2021-01-15 16:41:28

Why can't import ... from '...' variables be used?

Hello, why can't you use backticks in a construction? Why can't you use import like this:import ... from '...'

const file = 'index.js'
import что-то from `./папка/${file}`

// так тоже нельзя
import что-то from './папка/' + file

Since you can't use import the way I showed, maybe there is another way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-01-15
@squadbrodyaga

Dynamic Imports

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question