From 5aaed44d2878ad42f63e327b10894382e9314351 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 19 Nov 2020 16:52:11 +0100 Subject: [PATCH] fix: use cjs exports for node entries --- src.runtime/node/http/index.ts | 8 ++++---- src.runtime/node/index.ts | 3 --- src.runtime/node/net/index.ts | 4 ++-- src.runtime/node/stream/index.ts | 6 +++--- 4 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 src.runtime/node/index.ts diff --git a/src.runtime/node/http/index.ts b/src.runtime/node/http/index.ts index d9766b01..4fe1a1b3 100644 --- a/src.runtime/node/http/index.ts +++ b/src.runtime/node/http/index.ts @@ -1,8 +1,8 @@ -import { METHODS, STATUS_CODES } from './consts' -import { IncomingMessage } from './request' -import { ServerResponse } from './response' +const { METHODS, STATUS_CODES } = require('./consts') +const { IncomingMessage } = require('./request') +const { ServerResponse } = require('./response') -export default { +module.exports = { METHODS, STATUS_CODES, IncomingMessage, diff --git a/src.runtime/node/index.ts b/src.runtime/node/index.ts deleted file mode 100644 index 6eb78dc1..00000000 --- a/src.runtime/node/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './http' -export * from './net' -export * from './stream' diff --git a/src.runtime/node/net/index.ts b/src.runtime/node/net/index.ts index ba67d7d1..3de5b87b 100644 --- a/src.runtime/node/net/index.ts +++ b/src.runtime/node/net/index.ts @@ -1,5 +1,5 @@ -import { Socket } from './socket' +const { Socket } = require('./socket') -export default { +module.exports = { Socket } diff --git a/src.runtime/node/stream/index.ts b/src.runtime/node/stream/index.ts index 26f136db..41877254 100644 --- a/src.runtime/node/stream/index.ts +++ b/src.runtime/node/stream/index.ts @@ -1,7 +1,7 @@ -import { Readable } from './readable' -import { Writable } from './writable' +const { Readable } = require('./readable') +const { Writable } = require('./writable') -export default { +module.exports = { Readable, Writable }