rubenspgcavalcante/webpack-chrome-extension-reloader

Incorrect webpack peer dependency range?

Closed this issue · 1 comments

IanVS commented

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: MacOS
  • Library Version: 1.2.0

I'm going to open a PR:

  • yes
  • no

Description:
I'm attempting to upgrade from 0.6.0 to 1.2.0, and I got a warning that I need to set mode='development' in webpack. But AFAIK, that option was added in webpack 4 and I am still on webpack 2 in this particular project. That's still valid according to your peer dependency range >=2 <5, but my webpack throws an error when I try to set a mode property. I also can't find any kind of changelog or release notes to know at which version support for older webpack versions was apparently dropped. So, I'll try installing older versions and see what happens. But I think the peer dependency number might need to be updated.

Hi @IanVS , sorry for the late response (I was on vacations).
That's true, they removed the NODE_ENV and adopted this flag only in v4. Although the plugin should work fine in the described range, I'll check if is possible to access the current version used and try to use NODE_ENV instead.
The problem is that the version needs to be provided within the Webpack object (or library) at runtime, and I'm not 100% sure if this info is there. If not, I'll need to rephrase the warning to be targeted only for users of => v4