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

manifest.json file listens for compilation issues #261

Closed
wangxinyugithub opened this issue Nov 9, 2023 · 9 comments · Fixed by #266
Closed

manifest.json file listens for compilation issues #261

wangxinyugithub opened this issue Nov 9, 2023 · 9 comments · Fixed by #266
Assignees
Labels
enhancement New feature or request

Comments

@wangxinyugithub
Copy link

The manifest.ts file has added listening, but the contents modified after starting local development are not updated in the compiled dist file

It is hoped that the contents of the manifest.ts file can be modified during the development process to monitor the simultaneous update of the manifest.json file in the dist file after recompilation

@wangxinyugithub wangxinyugithub added the enhancement New feature or request label Nov 9, 2023
Copy link

github-actions bot commented Nov 9, 2023

Thank you for your contribution. We will check and reply to you as soon as possible.

@PatrykKuniczak
Copy link
Collaborator

PatrykKuniczak commented Nov 9, 2023

@wangxinyugithub We're not listening for files outside of src, but i think also about listening for manifest or other core files.

Are you want to open PR with that change?

But it's possibility @Jonghakseo will want to do it, when he will working on #184

@PatrykKuniczak
Copy link
Collaborator

Now i have a think.

This template is created for solved issue with working on yours plugins, not the core code, manifest is outside of src.

We must think about it, maybe it's good idee.

Let's wait whats @Jonghakseo write :)

@Jonghakseo
Copy link
Owner

I'll delegate the change detection for local files to the filesystem and apply the changes detected by the plugin to the completion of the build. While I'm at it, I'll also look at this issue.

@Jonghakseo
Copy link
Owner

Jonghakseo commented Nov 11, 2023

I was hoping to be able to handle the issue content while doing the above, but it's more complicated than I thought, so I'll cover that separately.

I need to create a new manifest when I change the manifest, which is inconvenient because I have to reimport the changed manifest.ts file, but I think I can do it, just be a bit patient.

@PatrykKuniczak
Copy link
Collaborator

I was hoping to be able to handle the issue content while doing the above, but it's more complicated than I thought, so I'll cover that separately.

I need to create a new manifest when I change the manifest, which is inconvenient because I have to reimport the changed manifest.ts file, but I think I can do it, just be a bit patient.

As you write, it's not working now, it detect changes in manifest, but after reload the content inside output manifest.json is old

@Jonghakseo
Copy link
Owner

This is a complicated issue. I used dynamic import to re-import the manifest at the end of the build, but the module system recognized it as a cached module already, so the changes to the contents are not reflected.

I should probably replace the manifest file with js (keeping the type as JSDoc) and use require, but that doesn't seem easy since vite already works as an esm. :(

@Jonghakseo
Copy link
Owner

@all-contributors please add @wangxinyugithub for bug

Copy link
Contributor

@Jonghakseo

I've put up a pull request to add @wangxinyugithub! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants