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

Qwik adds js / ts extension on import #1465

Open
1 of 12 tasks
bastiW opened this issue May 29, 2024 · 2 comments
Open
1 of 12 tasks

Qwik adds js / ts extension on import #1465

bastiW opened this issue May 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@bastiW
Copy link

bastiW commented May 29, 2024

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Preact
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

https://mitosis.builder.io/playground/?code=JYWwDg9gTgLgBAZQiApgYWZAdir8BmUycA5AHQD0AzsigLQDGmEOeZANsDCiQNwBQ%2FFAA9IsOABMU%2BAIYBXdgTlYGMYCzgZwLXDADyANxRQDwFAHcAFAEo4Ab35w4UFDDlQscS46dwAPAB8Pr7%2BSKha2LoBfhRh6MysMEEhMUE%2B1gIAvvxAA

Expected Behaviour

Should not add .jsx or .tsx on import

Actual Behaviour

image

Additional Information

I have the following setting in my mitosis.config.js

    qwik: {
      typescript: true,
      preserveFileExtensions: false
    },
@bastiW bastiW added the bug Something isn't working label May 29, 2024
@sidmohanty11
Copy link
Collaborator

@bastiW thanks for raising this, we have a helper already for this called explicitImportFileExtension but seems like its not added for qwik

we can reuse explicitImportFileExtension for qwik something like this,

return args.explicitImportFileExtension ? '.js' : '';

in

@JerryWu1234
Copy link
Contributor

should specify this demand more clear.

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

No branches or pull requests

3 participants