rollup-plugin-pathmodify
v1.0.1
Published
Same like rollup-plugin-alias, but with regex
Downloads
10
Readme
rollup-plugin-pathmodify
Same like rollup-plugin-alias, but with regex
Installation
npm install --save-dev rollup-plugin-pathmodify
Usage
var rollup = require('rollup').rollup;
var pathmodify = require('rollup-plugin-pathmodify');
rollup({
entry: 'main.js',
plugins: [
pathmodify({
aliases: [
{
id: 'Foundation', // Same as /^Foundation/
resolveTo: __dirname + '/../../../Foundation/FrontEnd/code/Patterns'
},
{
id: /^Feature\/([A-Za-z]+)\/([A-Za-z]+)\/([A-Za-z]+)\/([A-Za-z]+)/,
resolveTo: __dirname + '/../../../Feature/$1/code/Patterns/$2/$3/$4'
},
{
id: /^Project\/([A-Za-z]+)/,
resolveTo: __dirname + '/../../../Project/$1/code/Patterns'
}
]
})
]
}).then(...)
License
MIT