Dabolus / pwa-webpack-starter-kit

PWA Starter Kit with Webpack
MIT License
12 stars 5 forks source link

[BUG] browserslist: Unknown arguments --hot. #2

Closed Satawe-no closed 5 years ago

Satawe-no commented 5 years ago

Hi,

The project looks amazing, I'de like to play with it, but I get some errors with scripts in package.json.

Describe the bug I get this error browserslist: Unknown arguments --hot. when I run yarn run start. Maybe I have to do something with my windows 10 os ? If I remove this BROWSERSLIST=\"edge > 12\" it works but I get another error in the browser console __webpack_require__(...) is not a function. Should I do something to make it works?

To Reproduce Steps to reproduce the behavior:

  1. run script: yarn run start

Desktop (please complete the following information):

Dabolus commented 5 years ago

Hi! Thanks for you interest in this project. Assigning environment variables in that way only works on bash-like shells, and that's the reason why you are experimenting this issue on Windows. It is quite easy to make it cross-platform, though. Give me a couple of minutes.

Dabolus commented 5 years ago

@Satawe-no the issue should be fixed now, can you please pull the master branch and check if it works?

Satawe-no commented 5 years ago

Thank you 👍

But i'm still with the other problem __webpack_require__(...) is not a function. You don't have this problem ?

Dabolus commented 5 years ago

After finally putting my hands on a Windows PC I was able to reproduce the issue. Seems like some Webpack plugin is causing this, as I'm able to get the error even with an ultra simple app with the same Webpack configuration. I will investigate more deeply in the next few days and check back when I manage to find a solution

Satawe-no commented 5 years ago

Great, I hope you will find the fix fastly, I'm looking forward to trying ! I try on my side too to find a solution.

benbenbenbenbenben commented 5 years ago

I don't know if this is a complete fix, but I changed base.config.ts line 41 so that it matches both back slash and forward slash and now yarn run start works for me.

exclude: /node_modules[\/\\](?!(pwa-helpers|@polymer)[\/\\]).*/,

edit: I've submitted a pull request for this. https://github.com/Dabolus/pwa-webpack-starter-kit/pull/3

Satawe-no commented 5 years ago

@benbenbenbenbenben Works for me too with this code. Thanks

Dabolus commented 5 years ago

@benbenbenbenbenben great catch, thanks!

Dabolus commented 5 years ago

Fixed by merging #3