babel-plugin-module-resolver
babel-plugin-module-resolver copied to clipboard
Work with Rollup
Given following config:
["module-resolver", {
"root": ".",
"alias": {
"@": "."
}
}]
And sample code:
import main from '@/src/index'
This will be transformed to:
import main from './src'
Which would not work in Rollup, it has to be ./src/index
Why would it need to be /index? index.js is the default file loaded in a directory