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

[Bug Report]: Cannot run and build with dynamic require statement #941

Closed
CrazyboyQCD opened this issue Feb 1, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working resolver

Comments

@CrazyboyQCD
Copy link

CrazyboyQCD commented Feb 1, 2024

Steps to reproduce

To be minimum.

  1. Initialize a nake project with one index.html and one index.js.
  2. Add farm and component-classes.
  3. Try to use component-classes to avoid tree-shaking.
    image

The error was caused by this snippet from component-classes.
image

What is expected?

Running and building with no errors.

What is actually happening?

Running and building with errors.
Runing:
image
Building:
image

System Info

System:
    OS: Windows 11 10.0.22000
  Binaries:
    Node: 18.19.0 - D:\nodejs\node.EXE
    npm: 10.2.3 - D:\nodejs\npm.CMD
    pnpm: 8.14.1 - D:\nodejs\pnpm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22000.120.0), Chromium (121.0.2277.83)

Any additional comments?

Since I'm migrating from an old project, the component-classes dep cannot be removed in short term.

@CrazyboyQCD CrazyboyQCD changed the title Cannot build with dynamic require statement Cannot build with dynamic require statement Feb 1, 2024
@CrazyboyQCD CrazyboyQCD changed the title Cannot build with dynamic require statement Cannot run and build with dynamic require statement Feb 1, 2024
@CrazyboyQCD CrazyboyQCD changed the title Cannot run and build with dynamic require statement [Bug Report]: Cannot run and build with dynamic require statement Feb 1, 2024
@wre232114
Copy link
Member

Thanks for reporting issues. I'll take a look.

wre232114 pushed a commit that referenced this issue Feb 1, 2024
@wre232114 wre232114 self-assigned this Feb 1, 2024
@wre232114 wre232114 added bug Something isn't working resolver labels Feb 1, 2024
@wre232114 wre232114 reopened this Feb 1, 2024
@wre232114
Copy link
Member

fixed in @farmfe/[email protected]

This was referenced Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolver
Projects
None yet
Development

No branches or pull requests

2 participants