Skip to content

Commit fe92cce

Browse files
committed
comments
1 parent 9ca0c35 commit fe92cce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/server/bundle-renderer/create-bundle-runner.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,16 @@ export function createBundleRunner (entry, files, basedir, runInNewContext) {
102102
// each render, it simply calls the exported function. This avoids the
103103
// module evaluation costs but requires the source code to be structured
104104
// slightly differently.
105+
106+
// the initial context is only used for collecting possible non-component
107+
// styles injected by vue-style-loader.
105108
const initialContext = {}
106109
const sharedContext = createContext(initialContext)
110+
111+
// On subsequent renders, __VUE_SSR_CONTEXT__ will not be avaialbe
112+
// to prevent cross-request pollution.
107113
delete sharedContext.__VUE_SSR_CONTEXT__
114+
108115
let runner // lazy creation so that errors can be caught by user
109116
return (userContext = {}) => new Promise(resolve => {
110117
if (!runner) {

0 commit comments

Comments
 (0)