diff --git a/lib/plugin.js b/lib/plugin.js index 83d160a..6c1a073 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -45,13 +45,13 @@ const extendKYInstance = instance => { } export default (ctx, inject) => { - // Set baseURL - const baseURL = process.browser + // Set prefixUrl + const prefixUrl = process.browser ? '<%= options.browserBaseURL %>' : (process.env._HTTP_BASE_URL_ || '<%= options.baseURL %>') const kyDefaults = { - baseURL, + prefixUrl, headers: {} }