UNPKG

webpack-resolve-short-path-plugin

Version:

A plugin for enhanced-resolve (Webpack v2) that resolves paths like ~module to %rootPath%/module so you don't have to write relative paths like ../../../module.

6 lines (4 loc) 132 B
var path = require('path'); module.exports = function(rootPath, shortPath) { return path.join(rootPath, shortPath.substr(1)); };