Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import/export #33

Closed
soyjavi opened this issue Mar 21, 2017 · 3 comments
Closed

import/export #33

soyjavi opened this issue Mar 21, 2017 · 3 comments
Assignees
Milestone

Comments

@soyjavi
Copy link

soyjavi commented Mar 21, 2017

Hi,

In mediasmart.io we are moving to use CS2 and we would like to use import/export modules (http://coffeescript.org/v2/#modules). The problem is simple, we are getting an error when we are trying to get a basic module:

You may need an appropriate loader to handle this file type.
SyntaxError: 'import' and 'export' may only appear at the top level

Could you give us light about this? Here is our super simple example:

math.coffee

export default Math

other.coffee

import Math from './math'
@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Mar 21, 2017

As long as you guys didn't patch it yourself this loader doesn't support CS2 yet (#30)

package.json

I will give this priority, already started the initial work on this a few days ago, give me a day 😛

@soyjavi
Copy link
Author

soyjavi commented Mar 22, 2017

🖖

@alexander-akait
Copy link
Member

Looks like fixed + we added tests, feel free to feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants