Define aliases when bundling packages with Rollup.
When we write tests, we may want an easier way to access the local library we are testing or mocking libraries. We may also define aliases to counteract "require hell" and get rid of all those ../../../
imports we may have in the process.
For Webpack users: This is a plugin to have a resolve.alias
functionality in Rollup.
npm install rollup-plugin-alias
import { rollup } from 'rollup';
import alias from 'rollup-plugin-alias';
rollup({
entry: './src/index.js',
plugins: [alias({
somelibrary: './mylocallibrary'
})],
});
MIT, see LICENSE
for more information