File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ export default function optionsSanitiser(input: RegistryOptions): Config {
164164 const gzip = zlib . gzipSync ( minified , { level : 7 } ) ;
165165 options . compiledClient = {
166166 ...compiled ,
167+ imports : clientOptions . imports ,
167168 code : {
168169 minified,
169170 gzip,
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ function componentPreview(
3434 previewView ( {
3535 robots : res . conf . discovery . robots ,
3636 component,
37- importmap : getOcConfig ( res . conf . path ) ?. development ?. importmap ,
37+ importmap :
38+ getOcConfig ( res . conf . path ) ?. development ?. importmap ||
39+ res . conf . compiledClient ?. imports ,
3840 fallbackClient : res . conf . fallbackClient
3941 ? `${ res . conf . fallbackRegistryUrl . replace ( / \/ $ / , '' ) } /oc-client/client.dev.js`
4042 : undefined ,
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ export interface Config<T = any> {
174174 * @internal
175175 */
176176 compiledClient ?: {
177+ imports ?: Record < string , string > ;
177178 code : { gzip : Buffer ; brotli : Buffer ; minified : string } ;
178179 map : string ;
179180 dev : string ;
You can’t perform that action at this time.
0 commit comments