Skip to content

Commit 86feef0

Browse files
authored
Add fetch
1 parent 998bd58 commit 86feef0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ const path = require('path');
44
const template = fs.readFileSync(path.join(__dirname, '.', 'dist', 'index.html')).toString();
55
const win = domino.createWindow(template);
66
const files = fs.readdirSync(`${process.cwd()}/dist-server`);
7+
import fetch from 'node-fetch';
78
// const styleFiles = files.filter(file => file.startsWith('styles'));
89
// const hashStyle = styleFiles[0].split('.')[1];
910
// const style = fs.readFileSync(path.join(__dirname, '.', 'dist-server', `styles.${hashStyle}.bundle.css`)).toString();
1011

12+
win.fetch = fetch;
1113
global['window'] = win;
1214
Object.defineProperty(win.document.body.style, 'transform', {
1315
value: () => {

0 commit comments

Comments
 (0)