sweet-js / sweet-core

Sweeten your JavaScript.
https://www.sweetjs.org
BSD 2-Clause "Simplified" License
4.58k stars 208 forks source link

import statements missing in output #727

Closed gabejohnson closed 7 years ago

gabejohnson commented 7 years ago

input

// a.js
export var a = 42;

// b.js
import { a } from './a';

output

gabejohnson commented 7 years ago

@disnet any ideas on this?

disnet commented 7 years ago

are you running sweet on b.js? We aren't bundling (yet) so unsurprising you get empty output.

gabejohnson commented 7 years ago

Yes. On b.js but this was my attempt at a minimal repro. If you try to compile any of the stuff at https://github.com/gabejohnson/fantasy-interfaces you'll see what I'm talking about.

disnet commented 7 years ago

Oh! As the title to this issue implies the import statement is missing. Sorry, my brain completely missed that.

Yes, I think I know exactly what's going wrong. I'll get a fix together.