Skip to content

Fix/error on hmr when file path is null#213

Merged
shellscape merged 2 commits intoshellscape:masterfrom
zauan:fix/error-on-hmr-when-filePath-is-null
Mar 13, 2021
Merged

Fix/error on hmr when file path is null#213
shellscape merged 2 commits intoshellscape:masterfrom
zauan:fix/error-on-hmr-when-filePath-is-null

Conversation

@zauan
Copy link
Contributor

@zauan zauan commented Feb 22, 2021

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

If yes, please describe the breakage.

Please Describe Your Changes

The invalid hook from webpack filePath argument can be a string or null ( https://github.com/webpack/webpack/blob/64fb5f33f7b242fdbe8da453f793dbf95f4699e8/lib/Compiler.js#L168 ). This resolves a problem when the filePath is null ( the server throws an error and closes )

…ndow'

When building a library and use a multi entry config, only the last item in the entry array will be exposed. The example that was provided by the plugin would expose the webpack plugin serve client in the end file and it breaks the app
filePath on webpack invalid hook can return filePath or null. This resolves the following error when it returns null

Cannot read property 'replace' of null
@shellscape shellscape merged commit a31a96e into shellscape:master Mar 13, 2021
@shellscape
Copy link
Owner

thanks!

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

Successfully merging this pull request may close these issues.

2 participants