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
Before colocation, if someone had a component JS that is just a reexport of another component JS:
// app/components/one.js export default class extends Component {} // app/templates/components/one.hbs One // app/components/two.js export { default} from './one'; // app/templates/components/two.hbs Two
This actually gave you two distinct components with the different templates.
But after colocation, templates are associated with JS by value, and since:
import One from './components/one'; import Two from './components/two'; assert.strictEqual(One, Two); // passes
This means they can no longer have different templates. The codemod is unaware of this and just breaks your components.
A better output for the codemod would be rewriting re-exported component classes as extensions:
-export { default } from './one'; +import Component from './one'; +export default class extends Component {};
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Before colocation, if someone had a component JS that is just a reexport of another component JS:
This actually gave you two distinct components with the different templates.
But after colocation, templates are associated with JS by value, and since:
This means they can no longer have different templates. The codemod is unaware of this and just breaks your components.
A better output for the codemod would be rewriting re-exported component classes as extensions:
The text was updated successfully, but these errors were encountered: