File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,12 +184,13 @@ export function transformStencil(
184184 const tagName = result . data [ 0 ] . tagName ;
185185 const className = result . data [ 0 ] . componentClassName ;
186186
187- // In dev mode, re-export the class so hmrStandalone can find it in the
188- // re-imported module (customelement mode strips the export keyword).
189- const devExport = dev ? `\nexport{${ className } };` : '' ;
187+ // customelement mode strips the export keyword, so re-export the class
188+ // ourselves — consumers import it by name, and
189+ // hmrStandalone needs it in the re-imported module in dev mode
190+ const namedExport = `\nexport{${ className } };` ;
190191 const out = dev
191- ? result . code + devExport + buildHmrSnippet ( tagName , className , framework )
192- : result . code ;
192+ ? result . code + namedExport + buildHmrSnippet ( tagName , className , framework )
193+ : result . code + namedExport ;
193194
194195 const docsComponent = cmpMetaToDocsComponent ( result . data [ 0 ] , id ) ;
195196
You can’t perform that action at this time.
0 commit comments