Skip to content
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

Not working with webpack 5 #82

Open
chaoyangnz opened this issue Jul 8, 2021 · 2 comments
Open

Not working with webpack 5 #82

chaoyangnz opened this issue Jul 8, 2021 · 2 comments

Comments

@chaoyangnz
Copy link

chaoyangnz commented Jul 8, 2021

I use this plugin with webpack 5. It causes the wrong module resolving.

I have an example repo to reproduce it:

When I enable this plugin in webpack.config.js, check webpack verbose logs, search package.json, you will see package.json in node_modules will be resolved to the package.json in my repo.

When I disable this plugin, the module is resolved correctly.

The repo: https://github.com/chaoyangnz/webpack-5-wrong-module-resolve

@chaoyangnz
Copy link
Author

probably duplicated with #76

@Bessonov
Copy link

Run in the same issue. Generated output with plugin:

var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../package.json */ "./package.json");

Without plugin:

var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../package.json */ "../../../packages/demo.frontend/package.json");

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

No branches or pull requests

2 participants