mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Use relative path for plugins paths
This commit is contained in:
parent
e1be5944cd
commit
4cfe700846
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user