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

Remove the manifest data from cache on crx.load() #71

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

binhqx
Copy link
Contributor

@binhqx binhqx commented Feb 24, 2017

The require API keeps a global cache of all the files loaded via require(). Changes in the 'manifest.json' will not be picked up after the first time crx.load(...) is run.

The require API keeps a global cache of all the files loaded via require(). Changes in the 'manifest.json' will not be picked up after the first time crx.load(...) is run.
@ngyikp
Copy link
Contributor

ngyikp commented Feb 27, 2017

How about JSON.parse(fs.readFileSync()) [or the async version] instead of require()?

@thom4parisot
Copy link
Owner

Just out of curiosity, in which case would crx run and encounter the same manifest twice; a manifest which would have been modified in the meantime?

In any case, I totally agree this kind of side effect should be avoided and I'd rather rely an fs.readFile call instead. I suspect it is more nicely browserified too (if it has to).

@thom4parisot thom4parisot merged commit 12b3bfa into thom4parisot:master Feb 15, 2018
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.

3 participants