Hotfix: invalid-typeof-value error in webpack - typeof string must be 'boolean' and not 'bool' only#161
Open
elcheco wants to merge 2 commits intovojtech-dobes:masterfrom
Open
Hotfix: invalid-typeof-value error in webpack - typeof string must be 'boolean' and not 'bool' only#161elcheco wants to merge 2 commits intovojtech-dobes:masterfrom
elcheco wants to merge 2 commits intovojtech-dobes:masterfrom
Conversation
… 'boolean' and not 'bool' only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I set up webpack for the new project in the company and as we're using Nette Framework I add also nette.ajax.js through yarn into the project and require this library in webpack. In development mode everything worked fine and I had no issues, but in the production build, the webpack through compilation always died with a stupid unclear message:
ERROR in unknown: Invalid typeof value
After a couple of hours searching where just it could be I got into nette.ajax.js - when required then it has been destroying the build. So I started to search a bit more in the code following this:
https://github.com/jamesallardice/jslint-error-explanations/blob/master/message-articles/invalid-typeof-value.md
and I have found one place where was the comparison against "bool" and not "boolean". I repair it to "boolean" and since then compilation is working fine...