A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/commit/2d32b5d1b663fa331ec256b73e937af15eb6e3d5 below:

auto-remove initial state script if prod (#6763) · vuejs/vue@2d32b5d · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+4

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+4

-1

lines changed Original file line number Diff line number Diff line change

@@ -191,10 +191,13 @@ export default class TemplateRenderer {

191 191

contextKey = 'state',

192 192

windowKey = '__INITIAL_STATE__'

193 193

} = options || {}

194 +

const autoRemove = process.env.NODE_ENV === 'production'

195 +

? '(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());'

196 +

: ''

194 197

return context[contextKey]

195 198

? `<script>window.${windowKey}=${

196 199

serialize(context[contextKey], { isJSON: true })

197 -

}</script>`

200 +

}${autoRemove}</script>`

198 201

: ''

199 202

}

200 203

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4