From d6a32a925fa33b310901eabcfc570e3f0580b629 Mon Sep 17 00:00:00 2001 From: Alexey Krupskiy Date: Tue, 3 Apr 2018 17:46:18 +0700 Subject: [PATCH 1/2] fix problem with backslashes in path to schemes on windows --- lib/module/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module/plugin.js b/lib/module/plugin.js index 80134db5b..c1909ad99 100644 --- a/lib/module/plugin.js +++ b/lib/module/plugin.js @@ -3,7 +3,7 @@ import Auth from './auth' import './middleware' // Active chemes -<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${path}'`).join('\n') %> +<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${process.platform==="win32"?path.replace(/\\/g,'\\\\'):path}'`).join('\n') %> export default function (ctx, inject) { // Options From 7cefd221d501f6bf4babbdcfe5680ebb269df84e Mon Sep 17 00:00:00 2001 From: Alexey Krupsky Date: Tue, 3 Apr 2018 18:16:32 +0700 Subject: [PATCH 2/2] cleanup --- lib/module/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module/plugin.js b/lib/module/plugin.js index c1909ad99..d88219bcf 100644 --- a/lib/module/plugin.js +++ b/lib/module/plugin.js @@ -3,7 +3,7 @@ import Auth from './auth' import './middleware' // Active chemes -<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${process.platform==="win32"?path.replace(/\\/g,'\\\\'):path}'`).join('\n') %> +<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${path.replace(/\\/g,'/')}'`).join('\n') %> export default function (ctx, inject) { // Options