0.0.2 • Published 7 years ago

rollup-plugin-path-alias v0.0.2

Weekly downloads
239
License
MIT
Repository
-
Last release
7 years ago

Rollup Mapping Directories

Mapping directory aliases for import & require statements.

Installation

npm install rollup-plugin-path-alias --save-dev

Usage

In rollup.plugins

var path = require('path');
var mapPath = require('rollup-plugin-path-alias');

importAlias({
    paths: {
        '~stylus': path.resolve(__dirname, 'src/stylus'),
	    '~components': path.resolve(__dirname, 'src/components'),	
    },
    extensions: ['js', 'vue', 'styl']
});

In your modules

import '~stylus/main.styl';
import Components from '~components'
0.0.2

7 years ago

0.0.1

7 years ago