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

plugin: don't panic on missing files #313

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

Conversation

wmertens
Copy link

When using the build API from Vite instead of the CLI, intermediate files are not written it seems. The resulting .d.ts file is correct.

When using the build API from Vite, intermediate files are not written it seems.
@qmhc
Copy link
Owner

qmhc commented Mar 19, 2024

Would you share your case about using the build API form Vite?

@wmertens
Copy link
Author

@qmhc I'm overhauling the Qwik build scripts and they do a bunch of stuff, so it's better to build via the API

@qmhc
Copy link
Owner

qmhc commented Mar 19, 2024

Thanks for your sharing. Is the unlink method thorwing error when you using js API?

@wmertens
Copy link
Author

Yes because the files aren't written somehow

@qmhc
Copy link
Owner

qmhc commented Mar 20, 2024

I tested locally, it's seems a issue of Vite.

If there a vite config file in root directory and you use API to run Vite, two processes will be created in the same time (plugin is created twice), which will take a error (one process removed some files and the other process cannot file them).

I remove the config file then get it working.

Or don't specify plugins option when you call the build method.

@wmertens
Copy link
Author

@qmhc wow good catch! Did you open an issue yet?

@qmhc
Copy link
Owner

qmhc commented Mar 20, 2024

Well, I searched the Vite documentation and could not find any description about the plugin name is identifier.

So duplicate plugin names may work. It requires users to avoid creating duplicate plugins.

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