Skip to content

Commit 5948a5f

Browse files
add importmap option
1 parent 8266596 commit 5948a5f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

website/static/schema.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,24 @@
129129
}
130130
},
131131
"additionalProperties": false
132+
},
133+
"importmap": {
134+
"description": "Importmap to add to the preview HTML's <head> section. Allows specifying ES module import mappings for development.",
135+
"type": "object",
136+
"properties": {
137+
"imports": {
138+
"description": "Map of module specifiers to URLs. Keys are module names and values are the URLs they should resolve to.",
139+
"type": "object",
140+
"additionalProperties": {
141+
"type": "string"
142+
},
143+
"example": {
144+
"react": "https://esm.sh/react@18",
145+
"lodash": "https://cdn.skypack.dev/lodash"
146+
}
147+
}
148+
},
149+
"additionalProperties": false
132150
}
133151
},
134152
"additionalProperties": false
@@ -206,6 +224,12 @@
206224
"dynamic": {
207225
"auth": "./mocks/auth-plugin.js"
208226
}
227+
},
228+
"importmap": {
229+
"imports": {
230+
"react": "https://esm.sh/react@18",
231+
"react-dom": "https://esm.sh/react-dom@18"
232+
}
209233
}
210234
}
211235
},

0 commit comments

Comments
 (0)