-
Notifications
You must be signed in to change notification settings - Fork 21
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
Repeated file changes doesn't properly compile manifest #628
Comments
I tried building the codebase, but I was getting a lot of errors without making any modifications. Some instructions would be appreciated and I could submit a |
@vwheezy have you looked at https://github.com/webextension-toolbox/webextension-toolbox which uses this plugin? |
@tm1000 Yes, that's what I'm using currently. I thought the issue was with that codebase, but I'm fairly certain I tracked the issue down to here. My |
How do you build the project? I have a good amount of time to try and fix this, plus I'll write some documentation for the future. I'm new to developing npm packages, but trying to rebuild the codebase using |
@vwheezy I believe I fixed those issues so please git pull and run npm upgrade. If you still have errors then please post them here. Thanks |
@tm1000 Ah so frustrating, I had gotten it working (without knowing how) and then I changed something and it's not working again (without knowing how) 🙂. I don't think your changes fixed it. I tried it using both Something I noticed: before I don't think I had the Thanks so much for the help. Let me know if there's anything I can do, I'm just banging my head against a wall trying to recreate the conditions where it was working. |
Completely forgot to mention this a long time ago: any change in |
I got it to work by forcing the I changed detectManifestModification(compiler: Compiler) {
if (compiler.modifiedFiles && compiler.options.context) {
console.log("!!! compiler modified files !!!", compiler.modifiedFiles);
const manifestFile = path.join(
compiler.options.context,
this.manifestNameDefault
);
// this.manifestChanged = compiler.modifiedFiles.has(manifestFile);
this.manifestChanged = true;
}
} |
What you could do is see the value of |
I'm not sure if this function is the issue. It correctly detects if I see in In Also, |
Actually this appears to be an issue in https://github.com/webextension-toolbox/webextension-toolbox where the copy plugin is copying manifest.json back over. The fix is listed below for webextension-toolbox, havent applied it yet because I am cleaning up this plugin to make more sense.
|
Briefly tested and it seems to work, thanks so much for the work! I'll submit an issue and PR to the project and link it to this issue. Not sure if this is the right place to ask this, but I've familiarized myself with this codebase and wanted to help contribute to this project more. Any issues, features, or documentation you need done? |
Using a mostly standard setup, the first
dev
compile outputs the correctmanifest.json
but every reload after uses the non-compiled version.E.g. first compilation outputs:
manifest.json
Second compilation:
manifest.json
First compile output shows:
Second compile output shows:
I've outputted the
changedFiles
variables and it's everything in the source tree excludingdist
, but includingmanifest.json
for some reason.Tried using
--copy-ignore
but couldn't figure out how to inject "packages" with globs.If this is a code issue, I could help submit a PR. If this is a setup issue, any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: