From ed2c4c78feba457429d31556e78e4b22b57d65bb Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Thu, 6 Jun 2019 23:15:00 -0600 Subject: [PATCH] use require.resolve instead of path.resolve to resolve path in node_modules --- gulp.d/tasks/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index 89ff28d..2f471c4 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -28,7 +28,7 @@ module.exports = (src, dest, preview) => () => { filter: '**/~typeface-*/files/*', url: (asset) => { const relpath = asset.pathname.substr(1) - const abspath = ospath.resolve('node_modules', relpath) + const abspath = require.resolve(relpath) const basename = ospath.basename(abspath) const destpath = ospath.join(dest, 'font', basename) if (!fs.pathExistsSync(destpath)) fs.copySync(abspath, destpath) -- 2.11.0