rpl / webpack-webext-plugin

a small Webpack plugin to integrate web-ext commands into a web-pack build.
MIT License
10 stars 5 forks source link

Re-opens Firefox when rebuilding #1

Open freaktechnik opened 7 years ago

freaktechnik commented 7 years ago

A new Firefox instance gets opened when webpack rebuilds the project.

Parka commented 7 years ago

@freaktechnik Haven't tested it thoroughly but I believe that the code in WebpackWebExt.prototype.apply

should be replaced by:

WebpackWebExt.prototype.apply = function(compiler) {
  compiler.plugin('emit', (compilation, callback) => {
    if (this.runOnce && !this.webExtRunPromise) {
        this.webExtRunPromise = this.runWebExtCommand();
    } else if (!this.webExtRunPromise){
      this.runWebExtCommand();
    }
    callback();
  });
};

I'll do a PR if I find no issues.

DannyHinshaw commented 5 years ago

@Parka any reason you never opened a PR on this?

Parka commented 5 years ago

@DannyHinshaw I just didn't get to test it enough, but it seemed to be working ok at the time.

DannyHinshaw commented 5 years ago

It worked for a little while until it didn't. At this point I'll just be developing in a different way, for multiple reasons (including this). Just wanted to note my experience here in case others end up here like I did.

Thanks for the reply

whizsid commented 4 years ago

I can confirm this issue and it fixes in #3 .

marioplumbarius commented 6 months ago

Hey @rpl , can you kindly have a look at this PR: https://github.com/rpl/webpack-webext-plugin/pull/4