alias-quokka-plugin
alias-quokka-plugin copied to clipboard
does not traverse subdirectories
I have a bunch of modules under @app, for example @app/api. alias-quokka-plugin
won't let me make an alias to @app, then find things under @app by traversing subdirectories.
Example: I have few packages:
-
@app/api
-
@app/lib/interface/status
-
@app/lib/enums
-
@app/lib/controller/BaseFormController
I would like to do this and have this package traverse subdirectories by itself:
"quokka": {
"plugins": ["alias-quokka-plugin"],
"alias": {
"@app": "src/app"
}
},
However, I have to do it this way, which is troublesome:
"quokka": {
"plugins": ["alias-quokka-plugin"],
"alias": {
"@app/api": "src/app/api",
"@app/lib/interface/status": "src/app/lib/interface/status",
"@app/lib/enums": "src/app/lib/enums",
"@app/lib/controller/BaseFormController": "src/app/lib/controller/BaseFormController"
}
},
Can this be fixed?
better yet, just support the mappings in my tsconfig AND subdirectory traversal 😄
From my tsconfig:
"paths": {
"@app/*": [
"app/*"
],
"@env/*": [
"environments/*"
],
"@angular/*": [
"../node_modules/@angular/*"
],
"@cm/*": [
"../node_modules/@cm/*"
]
}
Have the same problems. Pls fix it :)
@granteagon - I'm about to start work on a PR for ts config mapping:
- https://github.com/Gozala/alias-quokka-plugin/issues/6
I don't understand what you mean by subdirectories though?
As I understand it, aliases should not have additional logic other than being an alias. You're suggesting that the alias should glob subdirectories?
That being the case, globbing syntax should probably be used, and it feels like it should be a separate plugin?
"@app": "src/app/**/*"