UNPKG

487 BJavaScriptView Raw
1'use strict';
2
3exports.path = require('path').dirname(require.main.filename);
4
5exports.resolve = function(pathToModule) {
6 return exports.path + pathToModule;
7};
8
9exports.require = function(pathToModule) {
10 var r = 'function' === typeof __webpack_require__
11 ? __non_webpack_require__
12 : require;
13 return r(exports.resolve(pathToModule));
14};
15
16exports.toString = function() {
17 return exports.path;
18};
19
20exports.setPath = function(explicitlySetPath) {
21 exports.path = explicitlySetPath;
22};
\No newline at end of file