Skip to content

Circular imports do not build #89

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

Closed
hazae41 opened this issue Jan 14, 2021 · 2 comments · Fixed by #113
Closed

Circular imports do not build #89

hazae41 opened this issue Jan 14, 2021 · 2 comments · Fixed by #113
Labels
✘ bug Something isn't working

Comments

@hazae41
Copy link

hazae41 commented Jan 14, 2021

Hey, when building a project where two files import each other, the build fails

pages/index.tsx

import { Component } from "../components/component.tsx"

export const App = () => {
  // ...
}

components/component.tsx

import { App } from "../pages/index.tsx"

export const Component = () => {
  // ...
}

We get the following error

ERROR TypeError: Cannot resolve module "file:///workspace/.aleph/production.es2015/pages/index.16b03cd86.js" from "file:///workspace/.aleph/production.es2015/components/component.e9b0a1ba3.js".

@shadowtime2000 shadowtime2000 added the ✘ bug Something isn't working label Jan 14, 2021
@shadowtime2000
Copy link
Member

This will most likely fix with the new compiler #28 but I don't know for sure. Would circular imports work with something like NextJS tho?

ije added a commit that referenced this issue Feb 2, 2021
@ije ije mentioned this issue Feb 2, 2021
7 tasks
@shadowtime2000 shadowtime2000 linked a pull request Feb 2, 2021 that will close this issue
7 tasks
@ije ije closed this as completed in #113 Feb 4, 2021
@hazae41
Copy link
Author

hazae41 commented Feb 22, 2021

The bug still happens in 3.0 alpha 8 (Deno 1.7.5)

Same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✘ bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants