-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Version: 1.5.0
Steps To Reproduce
The alias in the title lets me import everything from my root with an absolute path, like import CustomText from '@/components/CustomText'.
- Have a
babel.config.jsfile with amodule-resolveralias like'@': './' - Try using a relative import like
import CustomText from '../../../components/CustomText' - See that there is no warning for the line
Link to code example:
babel.config.js:
module.exports = function (api) {
api.cache(true)
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
alias: {
'@': './',
},
},
],
],
}
}The current behavior
With just the alias '@': './', the plugin doesn't detect an import like import CustomText from '../../../components/CustomText' to be invalid. But if you add another alias like '@components': './components', then it does detect the aforementioned line as invalid.
The expected behavior
It should detect relative imports as invalid.
Metadata
Metadata
Assignees
Labels
No labels