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

Serious merging issues #65

Open
abhishekchotaliya opened this issue Aug 5, 2019 · 2 comments
Open

Serious merging issues #65

abhishekchotaliya opened this issue Aug 5, 2019 · 2 comments

Comments

@abhishekchotaliya
Copy link

This boilerplate works fine, but recently I have found out that the webpack configuration is somewhat incorrect and because of that, my background script is also reflected in my popup.js code.

(In my case, I am making an api call in background, but it is triggering the api call again when I open the popup)

I've rechecked my code in all possible ways and after that only I came to conclusion that the webpack configuration is merging all the js files.

Is there any option for NOT COMBINING the scripts at compile time?

@samuelsimoes
Copy link
Owner

We need some minimal sample code to check this bug. I did a simple test here putting an alert inside the js/background and it isn't triggering when opening the popover, it just appears when loading the extension as it should happen.

@abhishekchotaliya
Copy link
Author

Actually I figured out the issue. It was happening because I was importing one common function in both popup.js and background.js.

But somehow, when calling the background script function, it is triggering the popup.js function. Which I am not able to understand and debug.

Currently, I am closing the popup whenever I need to call that background script function and it is working fine for now.

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

No branches or pull requests

2 participants