Basically, I need to get variable from file, otherwise to get variable from default file.
I see best solution as:
import { variable } from "file.js"; // if variable exists
import { variable } from "default.js"; // otherwise import variable from default
But if file.js not exists I get an error. And its expecting, but not needs for me in this case. Is it possible to fix it with webpack and just ignore this import if file not exists?
An import()
statement isn't fit because I need import on build stage, not dynamic import at runtime.