hot-import
hot-import copied to clipboard
Hot Module Replacement (HMR) for Node.js
Link to https://github.com/Chatie/tsconfig/issues/16 ## Hot Import in ESM We can use `import('module-name?timestamp=${Date.now()}')` to reload the module. However, we are facing the problem that: CJS & ESM code are not compatible...
Recently there's an issue https://github.com/wechaty/heroku-wechaty-getting-started/issues/13 Which was caused by a module file without the default function export. First, the error message is terrible, because even myself can not understand what...
``` not ok 37 should monitored file change event at least once --- operator: ok expected: true actual: false at: Object. (/Users/travis/build/huan/hot-import/tests/fs-watch.spec.ts:221:5) stack: |- Error: should monitored file change event...
a.js `router = await hotImport("./b.js");` b.js ``` const test = new otherClass() export default test; ``` 运行时会出现,无法获取test的情况 --- 如果改为 a.js ``` router = await hotImport("./b.js"); router() ``` b.js ``` export...
Basically two issues: When I use something like: ``` const configF = await hotImport('config.js') const config = configF() ``` like the sample, I am getting an error says configF is...
Related to: https://github.com/nodejs/node/issues/20258#issuecomment-386782293 Will be fixed after v10.1 https://travis-ci.com/zixia/hot-import/jobs/122661135 ```shell > [email protected] test:unit /home/travis/build/zixia/hot-import > blue-tape -r ts-node/register -r source-map-support/register "src/**/*.spec.ts" "tests/**/*.spec.ts" internal/util.js:360 const filename = frame.getFileName(); ^ TypeError: frame.getFileName...
When I use this module I found the following error ```shell Error: not found caller file? at callerResolve (/root/ticket-bot/node_modules/hot-import/src/hot-import.ts:210:11) at Object. (/root/ticket-bot/node_modules/hot-import/src/hot-import.ts:58:5) at Generator.next () at /root/ticket-bot/node_modules/hot-import/dist/src/hot-import.js:7:71 at new Promise...
### Reproduce 1. In file `a.ts` I using the following code ```ts if (!hotMod || !hotMod.connector) { hotMod = await hotImport('../bot-logic') console.log('####### connector init inside on image', hotMod) } hotMod.connector.processMessage(message.room()...