From 4cfe70084666fb2aa0ca80175621df95d6c66671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 20 Jun 2017 20:31:03 +0200 Subject: [PATCH] Use relative path for plugins paths --- lib/app/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app/index.js b/lib/app/index.js index 4972dea315..64300af5ca 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -23,7 +23,7 @@ if (process.browser) { // Import SSR plugins <% plugins.forEach(function (plugin) { if (plugin.ssr) -{ %>let <%= plugin.name %> = require('<%= r(plugin.src) %>') +{ %>let <%= plugin.name %> = require('<%= relative(r(plugin.src)) %>') <%= plugin.name %> = <%= plugin.name %>.default || <%= plugin.name %> <% }}) %> @@ -132,7 +132,7 @@ async function createApp (ssrContext) { } <% } else { %> if (process.browser) { - let <%= plugin.name %> = require('<%= plugin.src %>') + let <%= plugin.name %> = require('<%= relative(plugin.src) %>') <%= plugin.name %> = <%= plugin.name %>.default || <%= plugin.name %> if (typeof <%= plugin.name %> === 'function') { await <%= plugin.name %>(ctx)