0.1.7 • Published 7 years ago

rollup-plugin-alias-module-specifiers v0.1.7

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

rollup-plugin-alias-module-specifiers

Rollup plugin to alias module specifiers (named specifiers and paths).

install

$ npm install -D rollup-plugin-alias-module-specifiers

example

import tool from 'utility/tool.js';

turns into

import tool from './third-party/some-utils/tool.js';

with a rollup config of

import aliasModuleSpecifiers from 'rollup-plugin-alias-module-specifiers';

export default {
    entry: 'index.js',
    plugins: [
        aliasModuleSpecifiers({
            'utility/': './third-party/some-util/'
        })
    ]
};

The options passed to aliasModuleSpecifiers are used to match the specifier by key and replace it with the given value. Keys must match from the start of the specifier and only the matched part is replaced.

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago