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

New public API does not compile in ember-cli 1.13.8 #3998

Closed
topaxi opened this issue Dec 15, 2015 · 14 comments
Closed

New public API does not compile in ember-cli 1.13.8 #3998

topaxi opened this issue Dec 15, 2015 · 14 comments

Comments

@topaxi
Copy link
Contributor

topaxi commented Dec 15, 2015

addon/relationships.js doesn't get compiled in my output (using ember-cli 1.13.8) and therefore results in a syntax error.

vendor.js:

// snip...
define('ember-data/relationships', function () {

    'use strict';

    export * from 'ember-data/-private/system/relationships';

});
// ...snip
@rwjblue
Copy link
Member

rwjblue commented Dec 15, 2015

Thanks for reporting. My guess is that the transpired used on older ember-cli doesn't support export *.

@rwjblue
Copy link
Member

rwjblue commented Dec 15, 2015

I'll test a bit more then submit a PR to change them to manual import and export statements.

@stefanpenner
Copy link
Member

Addon/ is handled by the addon though(it's Babel should handle this), seems strange Esperanto had anything to do with this

@rwjblue
Copy link
Member

rwjblue commented Dec 15, 2015

@stefanpenner - ember-cli-babel by default blacklists es6.modules, and the ember-cli build itself handles modules

@rwjblue
Copy link
Member

rwjblue commented Dec 15, 2015

@bmac
Copy link
Member

bmac commented Dec 22, 2015

@rwjblue what needs to happen for us to close this issue. Should Ember Data be manually importing and exporting the modules instead of using export *?

@fivetanley
Copy link
Member

I am kind of in favor of moving the files where these placeholder files are. These "re-export a module" files don't seem to add much value while making the compiled payload larger.

@rwjblue
Copy link
Member

rwjblue commented Dec 22, 2015

@fivetanley - I agree with you and will do that where possible, but in some cases that would also expose any named exports as "public" also (which I think is not what we want).

@bmac - Yes:

export { default } from 'abc';

Becomes:

import Foo from 'abc';

export default Foo;

@stefanpenner
Copy link
Member

export { default } from 'abc';

this should just work

@stefanpenner
Copy link
Member

@topaxi can you upgrade to ember-cli 1.13 please and try again.

@rwjblue
Copy link
Member

rwjblue commented Dec 22, 2015

@stefanpenner:

this should just work

Agreed, that is why I wrote it that way initially, but does not work all the time (in older ember-cli versions in the 1.13 series).

I guess we could say that to use Ember Data 2.3.0 "you must use latest ember-cli", but that seems somewhat harsh especially when we have a known work around.

@stefanpenner
Copy link
Member

but that seems somewhat harsh

it should be a small amount of effort to upgrade.

@rwjblue
Copy link
Member

rwjblue commented Dec 22, 2015

Should be, agreed. But the fact that ember-data 2.2.0 works with ember-cli@1.13.8 and 2.3.0-beta.3 does not is not good.

@stefanpenner
Copy link
Member

Lots of other add-ons use that syntax, i don't think switching back is healthy at all. People should just upgrade, their life will be better in many dimensions.

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

No branches or pull requests

5 participants