From 55bcd2872933026ab223c07ea1b0e0d782cb8e07 Mon Sep 17 00:00:00 2001 From: lilliputten Date: Wed, 4 Apr 2018 17:23:08 +0300 Subject: [PATCH] Generate correct includes list on windows hosts. --- tasks/generate-index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/generate-index.js b/tasks/generate-index.js index 057a735161..4b007fffc5 100644 --- a/tasks/generate-index.js +++ b/tasks/generate-index.js @@ -20,9 +20,10 @@ function getSymbols(callback) { }); } +const srcPath = path.posix.resolve(__dirname, '../src').replace(/\\/g,'/'); function getPath(name) { - const fullPath = require.resolve(path.resolve('src', name)); - return './' + path.posix.relative('src/', fullPath); + const fullPath = require.resolve(path.resolve('src', name)).replace(/\\/g,'/'); + return './' + path.posix.relative(srcPath, fullPath); } /**