-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require.main.require overwriting causes problems with vscode #381
Comments
Made a PR for that here #382 |
For what it's worth, I still get the error with this PR. May be related to microsoft/TypeScript#19117 If I use just straight up require, or change the conditional to be |
That's right, i updated my PR. |
@kisenka Please consider this issue. There is a PR to fix it. Happy to change it in any way. I'm not sure that the supplied PR #382 fixes it in my preferred way (the PR treats the "default" webpack version as 4, instead of null or empty string), but it would be awesome to get something in there so that vscode users using linting get back on latest branch. |
Using autodetecting webpack version was very bad idea. I've published alpha version without detecting webpack version, could some of you guys help me with trying it out?
|
Detecting webpack version has been dropped in |
Hello,
I am having a problem where vscode eslint is "crapping out" after including this library.
I get that this is probably a problem with vscode, and not with svg-sprite-loader.
The problem is specifically this line here:
https://github.com/JetBrains/svg-sprite-loader/blob/master/lib/utils/get-webpack-version.js#L6
Which results in the vscode error
Cannot find module webpack/package.json
Because of this error, eslint effectively "breaks" inside of vscode. If I hardcode
const webpackVersion = 4
, everything works great.I'm not exactly sure why eslint inside of vscode can't "resolve" this path on installation, but this is my finding so far.
I see that webpack has a version property, but it appears this property was only added since webpack 4, and apparently you support webpack 2-4, so I understand that it is not a solution.
The text was updated successfully, but these errors were encountered: