We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
foo.js
import Map from 'can/map/'; import 'can/map/define/'; import bar from 'myproject/src/bar/'; export const foo = Map.extend({ define: { propA: { get() { return bar.attr('propA'); } }, propB: { get() { return 'Hello World!'; } } });
bar.js
import Map from 'can/map/'; import 'can/map/define/'; import foo from 'myproject/src/foo/'; export const bar = Map.extend({ define: { propA: { get() { return 'Hello World!'; } }, propB: { get() { return foo.attr('propB'); } } });
this works in development. However in production, the define for foo calls
var _bar = _interopRequireDefault(_myprojectBar);
If the define for foo is called before the define for bar, then _bar === { 'default': {} }
_bar === { 'default': {} }
After bar is define, it seems that _bar in the foo define is not updated so that when foo.attr('propA') is called, it returns an undefined TypeError
The text was updated successfully, but these errors were encountered:
Thanks! This is an excellent test case.
Sorry, something went wrong.
main.js
import foo from './foo'; // true in dev, false in production console.log(foo.getBar().getFoo() === foo);
import bar from './bar'; export default { name: 'foo', getBar() { return bar; } }
import foo from './foo'; export default { name: 'bar', getFoo() { return foo; } }
Thanks for the simplified test case. Think we probably need stealjs/transpile#11 for this is my guess.
Breaking test for #382, circular references
fc85424
Adds test showing ES6 circular dependencies working with Babel
a3e7b98
Closes #382
Fixed by #535
matthewp
No branches or pull requests
foo.js
bar.js
this works in development. However in production,
the define for foo calls
If the define for foo is called before the define for bar, then
_bar === { 'default': {} }
After bar is define, it seems that _bar in the foo define is not updated so that when foo.attr('propA') is called, it returns an undefined TypeError
The text was updated successfully, but these errors were encountered: