anonimitoraf / skerrick

REPL-driven development for NodeJS
GNU General Public License v3.0
103 stars 6 forks source link

Re-evaluating `export default` doesn't update imports #3

Closed anonimitoraf closed 2 years ago

anonimitoraf commented 2 years ago
function b(n) {
  return 'b';
}
export default b;

and

import deef from './temp-2';
deef() // 'b'

is fine, but then,

function c(n) {
  return 'c';
}
export default c;

and

import deef from './temp-2';
deef() // 'b'

which should've printed out c instead

anonimitoraf commented 2 years ago

Fixed by https://github.com/anonimitoraf/skerrick/commit/07ed9d62b89098a345f0a38018be7f8dc51b51fd