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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悶] lib mode do not respect custom lib.entry in vite config #6177

Closed
diecodev opened this issue Apr 29, 2024 · 2 comments
Closed

[馃悶] lib mode do not respect custom lib.entry in vite config #6177

diecodev opened this issue Apr 29, 2024 · 2 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@diecodev
Copy link
Contributor

Which component is affected?

Qwik Rollup / Vite plugin

Describe the bug

When you try to overwrite the entrypoints in vite.config.ts file in lib mode, the optimizer just replace your specified entrypoint for the default, disrespecting the one you specified. I take a look to the optimizer.js file and the error occurs in here line 1870:
image

Reproduction

https://github.com/diecodev/qwik-date/blob/main/vite.config.ts

Steps to reproduce

  • create a qwik component library project
  • edit vite config file and add a custom lib.entry object or array ~ you can do this in vite, is in the docs ~ (only if you pass a custom string as entry point this is gonna be the entry, otherwise always is gonna be replaced by 'src/index.ts'

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M2
    Memory: 67.77 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/Library/Caches/fnm_multishells/28998_1714366621848/bin/node
    Yarn: 1.22.21 - ~/Library/Caches/fnm_multishells/28998_1714366621848/bin/yarn
    npm: 10.5.0 - ~/Library/Caches/fnm_multishells/28998_1714366621848/bin/npm
    pnpm: 9.0.6 - ~/Library/Caches/fnm_multishells/28998_1714366621848/bin/pnpm
    bun: 1.1.6 - ~/.bun/bin/bun
  Browsers:
    Chrome: 124.0.6367.91
    Safari: 17.4.1
  npmPackages:
    @builder.io/qwik: 1.5.2 => 1.5.2
    undici: * => 6.14.1
    vite: ^5.1.6 => 5.2.10

Additional Information

Fix this is very easy, you only need to check when the lib mode is activate if the inputOpts.input parameter in the normalizeOptions function is type Object or Array and make the proper handling for each case.

@PatrickJS
Copy link
Member

fixed by #6178

@diecodev
Copy link
Contributor Author

diecodev commented May 7, 2024

I just forgot to closr this issue. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants