webpack-ext-reloader icon indicating copy to clipboard operation
webpack-ext-reloader copied to clipboard

MV3 Support?

Open shuhankuang opened this issue 2 years ago • 9 comments

It will support MV3? thanks.

shuhankuang avatar Jul 13 '21 00:07 shuhankuang

At the moment, this will not work with MV3. However, we plan to release this functionality in the near future.

rushilsrivastava avatar Jul 14 '21 06:07 rushilsrivastava

Any news guys?

just-jeb avatar Dec 23 '21 09:12 just-jeb

The end of life of V2 reaching in a year and google started to slow down reviews of V2 starting this month....

obender avatar Jan 23 '22 06:01 obender

@rushilsrivastava Do you need any help implementing the V3 Support?

obender avatar Jan 23 '22 19:01 obender

Hey guys, thanks for being patient. Let me address a couple of things real quick:

The end of life of V2 reaching in a year and google started to slow down reviews of V2 starting this month....

Yup, MV2 end-of-life (no new updates will be allowed to existing MV2 extensions) is slated for January 2023. I predict that Google will probably end up delaying this, but nevertheless definitely pushes the need for V3 support. While I couldn't find any announcement for slow release of V2 extensions (anecdotally, all our reviews have been approved within 24-hours), as of January 2022, no new extensions with MV2 will be allowed. All this information can be found on Google's Support Page.

@rushilsrivastava Do you need any help implementing the V3 Support?

Here's my roadmap:

  • Publish new version v1.1.9 with latest bug fixes for Firefox and listeners. This will probably be the last release for 1.x granted there are no new bugs.
  • Start a new 2.x branch to start working on Manifest V3 changes. Once this is stable, this will become master.

As far as I know, there shouldn't be much work to get this to work in V3 other than reworking how background listeners work. I have no specific timeline to when I will be able to start work on V3, but if others are able to contribute PRs, I can commit to reviewing them and accelerating the roadmap accordingly.

rushilsrivastava avatar Jan 24 '22 01:01 rushilsrivastava

There seems to be a fix for it already, maybe you can use this https://github.com/rubenspgcavalcante/webpack-extension-reloader/pull/139/files @rushilsrivastava?

It's described more here: https://github.com/rubenspgcavalcante/webpack-extension-reloader/issues/125

TheSynt4x avatar Mar 15 '22 11:03 TheSynt4x

Hey guys, I just submitted a PR to fix this issue. My setup is MacOS Chrome + MV3. Both the extension and background page are working fine with this PR, leaving the content script untested. Feel free to use my fork before the PR merged.

reorx avatar Mar 16 '22 09:03 reorx

I been using reorx fork for now, any plans to merge it in?

kYem avatar Jul 31 '22 16:07 kYem

At the moment, this will not work with MV3. However, we plan to release this functionality in the near future.

come on

sherifmayika avatar Aug 22 '22 03:08 sherifmayika

I can confirm that PR created by lmichelin in #319 works for MV3 extensions.

tscislo avatar Nov 05 '22 18:11 tscislo

I intend to merge one of the open PRs by the end of November. There seems to be open review comments/concerns on each one of these PRs at the moment

rushilsrivastava avatar Nov 17 '22 05:11 rushilsrivastava

I intend to merge one of the open PRs by the end of November. There seems to be open review comments/concerns on each one of these PRs at the moment

There are two ways to resole the problem.

  1. remove polyfill, which is not required in MV3
  2. extend polyfill namespace for browser.runtime to chrome.runtime and browser.tabs to chrome.tabs

sherifmayika avatar Nov 29 '22 07:11 sherifmayika

I adapted @sherifmayika 's advice and finally made my fork work. Please try https://github.com/reorx/webpack-ext-reloader, which should be fully compatible with MV3.

reorx avatar Feb 23 '23 16:02 reorx

I adapted @sherifmayika 's advice and finally made my fork work. Please try https://github.com/reorx/webpack-ext-reloader, which should be fully compatible with MV3.

is it published to NPM?

Bnaya avatar Feb 28 '23 08:02 Bnaya

Yes it's npm i -D @reorx/webpack-ext-reloader

On Tue, Feb 28, 2023 at 4:24 PM Bnaya Peretz @.***> wrote:

I adapted @sherifmayika https://github.com/sherifmayika 's advice and finally made my fork work. Please try https://github.com/reorx/webpack-ext-reloader, which should be fully compatible with MV3.

is it published to NPM?

— Reply to this email directly, view it on GitHub https://github.com/SimplifyJobs/webpack-ext-reloader/issues/28#issuecomment-1447762759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADDDVEZKFVIAP2OCH64G3DWZWY5FANCNFSM5AH4IDJA . You are receiving this because you commented.Message ID: @.***>

-- Sincerely, Xiao Meng reorx.com

reorx avatar Feb 28 '23 09:02 reorx

@reorx thanks for taking the initiative! Your fork doesn't seem to work for me though, getting an error: image.

Reproduction: https://github.com/just-jeb/angular-chrome-extension/tree/mv3-background-reload

  1. git clone
  2. yarn
  3. yarn watch
  4. Load as unpacked from the dist/angular-chrome-extension folder

just-jeb avatar Mar 14 '23 08:03 just-jeb

Can you try the instruction at https://github.com/reorx/webpack-ext-reloader please? The fork may not working properly in the development environment.

On Tue, Mar 14, 2023 at 4:14 PM JeB @.***> wrote:

@reorx https://github.com/reorx thanks for taking the initiative! Your fork doesn't seem to work for me though, getting an error: [image: image] https://user-images.githubusercontent.com/9823087/224936678-733873bd-9560-4203-bf89-5eeee7bf6553.png .

Reproduction: https://github.com/just-jeb/angular-chrome-extension/tree/mv3-background-reload

  1. git clone
  2. yarn
  3. yarn watch
  4. Load as unpacked from the dist/angular-chrome-extension folder

— Reply to this email directly, view it on GitHub https://github.com/SimplifyJobs/webpack-ext-reloader/issues/28#issuecomment-1467610018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADDDVA6EQ7M363BVMXQRP3W4ASFVANCNFSM5AH4IDJA . You are receiving this because you were mentioned.Message ID: @.***>

-- Sincerely, Xiao Meng reorx.com

reorx avatar Mar 14 '23 08:03 reorx

If by instruction you mean readme then it does follow the instruction.
As for development environment - the whole point of this plugin is to work with development mode, am I missing something?

just-jeb avatar Mar 14 '23 09:03 just-jeb

@reorx thanks for taking the initiative! Your fork doesn't seem to work for me though, getting an error: image.

Reproduction: https://github.com/just-jeb/angular-chrome-extension/tree/mv3-background-reload

  1. git clone
  2. yarn
  3. yarn watch
  4. Load as unpacked from the dist/angular-chrome-extension folder

-(function(_window) { -let window: any -if (_window.document !== undefined) { -window = _window -}

+(function() { +try {window} catch {var window: any;};

sherifmayika avatar Mar 14 '23 10:03 sherifmayika

Or

(function(_window) {
let window: any
if (_window?.document !== undefined) {
  window = _window
}

I guess it does the same.

just-jeb avatar Mar 14 '23 12:03 just-jeb

Or

(function(_window) {
let window: any
if (_window?.document !== undefined) {
  window = _window
}

I guess it does the same.

try instead of guess

sherifmayika avatar Mar 14 '23 16:03 sherifmayika

Thank you for such a useful comment.

just-jeb avatar Mar 14 '23 16:03 just-jeb

Or

(function(_window) {
let window: any
if (_window?.document !== undefined) {
  window = _window
}

I guess it does the same.

did you test?

sherifmayika avatar Mar 15 '23 04:03 sherifmayika

Actually, I have test for the chrome extension, it shows me like this:

image

I think it has some problem about manifest v3 so far.

jianjungki avatar Mar 17 '23 15:03 jianjungki

Any updates regarding manifest v3 support?

xadamxk avatar Jun 11 '23 01:06 xadamxk

@xadamxk https://github.com/reorx/webpack-ext-reloader is working properly in my projects, you can have a try

reorx avatar Jun 11 '23 02:06 reorx

@reorx

Yup, I got your fork working after commenting here - thank you.

xadamxk avatar Jun 11 '23 02:06 xadamxk

Any hints on how to resolve the "Uncaught TypeError: Cannot read properties of undefined (reading 'document')" issue? @reorx image

xD33m avatar Jun 11 '23 20:06 xD33m

Any hints on how to resolve the "Uncaught TypeError: Cannot read properties of undefined (reading 'document')" issue? @reorx image

It's broken and is not being maintained, use this fork instead: https://github.com/reorx/webpack-ext-reloader

xadamxk avatar Jun 12 '23 00:06 xadamxk

Any hints on how to resolve the "Uncaught TypeError: Cannot read properties of undefined (reading 'document')" issue? @reorx image

It's broken and is not being maintained, use this fork instead: https://github.com/reorx/webpack-ext-reloader

There are 3 open PRs for Manifest V3, each has there own issues. I'll see if I can clean them up soon, but this repo is being maintained for V2.

rushilsrivastava avatar Jun 12 '23 00:06 rushilsrivastava