With the following project structure:
├─loader.ts
├┬models
│└┬─1model.ts
│ └─2model.ts
loader.ts:
import Models from './models/*'
console.log(Models)
model/1model.ts:
model/2model.ts
This project fails to compile with 'Identifier directly after number' error. After figuring out what's going on here, it turns out that the plugin generates the following code:
...
const Models = {
1model: _model1.default,
2model: _model2.default,
};
...
The plugin does not seem to handle cases where file names start with a number
With the following project structure:
loader.ts:
model/1model.ts:
model/2model.ts
This project fails to compile with 'Identifier directly after number' error. After figuring out what's going on here, it turns out that the plugin generates the following code:
The plugin does not seem to handle cases where file names start with a number