Skip to content

Commit

Permalink
Fix eslint-import-resolver-webpack with pnpm (#968)
Browse files Browse the repository at this point in the history
Updated resolve to ^1.4.0, where it introduced option to not preserve
symlinks when resolving, matching node's behavior.
  • Loading branch information
bsuh authored and benmosher committed Feb 22, 2018
1 parent 0231c78 commit 7f8f543
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resolvers/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ function createResolveSync(configPath, webpackConfig) {
}

try {
var webpackFilename = resolve.sync('webpack', { basedir })
var webpackResolveOpts = { basedir: path.dirname(webpackFilename) }
var webpackFilename = resolve.sync('webpack', { basedir, preserveSymlinks: false })
var webpackResolveOpts = { basedir: path.dirname(webpackFilename), preserveSymlinks: false }

webpackRequire = function (id) {
return require(resolve.sync(id, webpackResolveOpts))
Expand Down
2 changes: 1 addition & 1 deletion resolvers/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"is-absolute": "^0.2.3",
"lodash.get": "^4.4.2",
"node-libs-browser": "^1.0.0 || ^2.0.0",
"resolve": "^1.2.0",
"resolve": "^1.4.0",
"semver": "^5.3.0"
},
"peerDependencies": {
Expand Down

0 comments on commit 7f8f543

Please sign in to comment.