Skip to content

Commit 9799418

Browse files
committed
export inject function during ssr
1 parent d0a1eca commit 9799418

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ module.exports.pitch = function (remainingRequest) {
5858
// on the server: attach to Vue SSR context
5959
return shared.concat([
6060
'// add CSS to SSR context',
61-
'require(' + addStylesServerPath + ')(' + id + ', content, ' + isProduction + ');'
61+
'var add = require(' + addStylesServerPath + ')',
62+
'module.exports.__inject__ = function () {',
63+
' add(' + id + ', content, ' + isProduction + ')',
64+
'};'
6265
]).join('\n')
6366
}
6467
}

0 commit comments

Comments
 (0)