File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable */
2
2
var renderToString ;
3
3
try {
4
- renderToString = dep ( require ( 'preact-render-to-string' ) ) ;
4
+ const mod = require ( 'preact-render-to-string' ) ;
5
+ renderToString = mod . default || mod . renderToString || mod ;
5
6
} catch ( e ) {
6
7
throw Error (
7
8
'renderToString() error: missing "preact-render-to-string" dependency.'
8
9
) ;
9
10
}
10
11
11
- function dep ( obj ) {
12
- return obj [ 'default' ] || obj ;
13
- }
14
-
15
12
module . exports = {
16
13
renderToString : renderToString ,
17
14
renderToStaticMarkup : renderToString
Original file line number Diff line number Diff line change 1
- export { renderToString , renderToStaticMarkup } from 'preact-render-to-string' ;
1
+ export {
2
+ renderToString ,
3
+ renderToString as renderToStaticMarkup
4
+ } from 'preact-render-to-string' ;
You can’t perform that action at this time.
0 commit comments