error-overlay-webpack-plugin: We currently do not inject our entry code into single-file anonymous entries error
Hi,
Using "error-overlay-webpack-plugin": "^0.2.0" and "webpack": "^4.30.0", I got this error:
Error: We currently do not inject our entry code into single-file anonymous entries. Please use a multi-main (array) or object-form
entrysetting for now. at adjustEntry (PATH\node_modules\error-overlay-webpack-plugin\lib\index.js:56:11)
After removing error-overlay-webpack-plugin everything works fine.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 16 (6 by maintainers)
@neoziro if you can’t fix the issue (because of time limit or whatever), at least don’t close the issue with simple answer that don’t even fix the issue (I guess you are not sure neither as you mentioned I think in your answer). obviously I can not change my webpack config just because your plugin likes it that way.
Please don’t contribute to open source, but if you do be professional at it. I’ll remove your plugin, simply because I can not write my webpack config based on your buggy code.
I see you added
help wantedtag to almost all issues. if you can not support (clearly you can’t), at least add a note in README, so users can make better decision about using your code.Yeah you have to change entry I think, just that.
To anyone who like to have error overlay without
error-overlay-webpack-plugin, the solution is very simple, just runnpm i react-dev-utils -Dand change theentryoption of yourwebpack.config.jsto:[require.resolve('react-dev-utils/webpackHotDevClient'), './index.jsx'], I’m using this method for months.Remember, you should use
react-dev-utilsonly indevelopmentmode.@neoziro I cloned
error-overlay-webpack-plugin, without any change the provided example works fine (of course I changedconst ErrorOverlayPlugin = require('../lib')toconst ErrorOverlayPlugin = require('../src')). also I updatedwabpackpackages and again everything works fine. I think I have to test the code with one of my projects. If I do (and could fix the problem), I’ll post the result here or submit PR for it.