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

move loader from legacy to harmony #5221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ocombe
Copy link
Member

@ocombe ocombe commented Jan 4, 2022

Created a new loader component in harmony. We still re-export the loader from legacy because if there are 2 instances of the loader it creates bugs in the cli, in the long term we should be able to completely move the code to harmony, but for now we need to re-export.

@@ -0,0 +1,3 @@
import loader from '@teambit/legacy/dist/cli/loader';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to move the real loader here, we don't allow regular components (which are not aspects) to be dependent on @teambit/legacy
you can by the way just export the loader from another temp workspace, then in this pr only start using it (also in the legacy code)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't do that, because if there are 2 instances of the loader it creates bugs in the cli

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we take the code from src/cli/loader/loader.ts into the loader here
and replace the code in the src/cli/loader/loader.ts to something like
export loader as default from '@teambit/harmony.modules.cli.loader';

And of course, add it to the package.jon once we export

Comment on lines +1 to +3
import loader from './loader';

export default loader;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also make at least a doc file for this

@@ -0,0 +1,3 @@
import loader from '@teambit/legacy/dist/cli/loader';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we take the code from src/cli/loader/loader.ts into the loader here
and replace the code in the src/cli/loader/loader.ts to something like
export loader as default from '@teambit/harmony.modules.cli.loader';

And of course, add it to the package.jon once we export

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

Successfully merging this pull request may close these issues.

None yet

2 participants