From 02ccf97485e9dca9724088a0383203cf7d0aa1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=A5=E7=91=9E?= Date: Sat, 7 Mar 2020 11:07:25 +0800 Subject: [PATCH] feat: export something inner make it easy to re-use code when do some custom register --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index dcb2849..cce574c 100644 --- a/index.js +++ b/index.js @@ -345,3 +345,13 @@ function stripLoader(dependency) { return dependency.slice(exclamationLocation + 1); } + +module.exports.resolveWebpackPath = resolveWebpackPath; +module.exports.stripLoader = stripLoader; +module.exports._innerCache = {webpackResolve}; +module.exports.dumpLookups = function() { + return supportedFileExtensions.reduce(function(result, key) { + result[key] = defaultLookups[key] + return result; + }, {}); +};