We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 931b24f commit be4b0c0Copy full SHA for be4b0c0
packages/vite/src/node/plugins/importAnalysisBuild.ts
@@ -71,7 +71,8 @@ function indexOfMatchInSlice(
71
*/
72
73
function detectScriptRel() {
74
- const relList = document.createElement('link').relList
+ const relList =
75
+ typeof document !== 'undefined' && document.createElement('link').relList
76
return relList && relList.supports && relList.supports('modulepreload')
77
? 'modulepreload'
78
: 'preload'
0 commit comments