-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoscan #70
Comments
As of now this feature is not working for |
Great feature, please keep it in! |
Hi, thank you for the awesome feature! Not sure if this is the right place to ask related questions but: The example usage demonstrates how it can make alias (
And I want to use absolute imports as if I set // In App.js.
import Foo from 'Foo'; |
Hi @SPiCaRiA, what is the problem, what is actually not worked for you? Error or something else. |
Hi, sorry I didn't make it clear: In my config-override.js: const options = {
autoscan: 'src',
}
module.exports = aliasWebpack(options) jsconfig.json and jsconfig.path.json: {
"extends": "./jsconfig.paths.json",
"compilerOptions": {
"baseUrl": "."
},
"include": ["src"]
}
{
"compilerOptions": {
"paths": {
"*": ["src/*"]
}
}
} The usage: import foo from 'my_dir/foo' // works
import bar from 'bar' // does not work, needs to be ./bar Yes it throws an error: Can't resolve 'bar' in '/dir/to/root/src' Did you mean './bar'? |
Yes it requires a little fix, track it #89. As of now you can try to use file import, like this: - import bar from 'bar'
+ import bar from 'bar/index' May be it need to specify extension (.js or .ts) |
Hmm, not sure if I'm understanding it correctly, but in my case Am I wrong about what autoscan does at the very beginning? I thought it does something similar as the CRA absolute imports. :x |
Warn: Experimental feature. It is not documented and may be subject to remove.
Please ask a questions, share opinions and suggestions. Share your experience if you tried to use
autoscan
.The text was updated successfully, but these errors were encountered: