Skip to content
This repository was archived by the owner on Dec 4, 2022. It is now read-only.

Commit 925b699

Browse files
author
David First
authored
prevent webpack from resolving packages symlinks in case of custom-resolve-modules. we do need them to stay with the package name so then dependency-tree will filter them as packages and not try to resolve their dependencies (#91)
1 parent 830dbdf commit 925b699

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [unreleased]
99

10+
## [2.0.3-dev.2] - 2019-02-21
11+
12+
- resolve symlink packages as packages when custom-resolve-modules is used
13+
1014
## [2.0.3-dev.1] - 2019-02-11
1115

1216
- fix resolve dependencies cache to include parsing errors

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bit-javascript",
3-
"version": "2.0.3-dev.1",
3+
"version": "2.0.3-dev.2",
44
"scripts": {
55
"flow": "flow; test $? -eq 0 -o $? -eq 2",
66
"lint": "eslint src && flow check || true",

src/dependency-builder/filing-cabinet/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ function resolveNonRelativePath(partial, filename, directory, resolveConfig) {
281281
if (resolveConfig.modulesDirectories) webpackResolveConfig.modules = resolveConfig.modulesDirectories;
282282
if (resolveConfig.aliases) webpackResolveConfig.alias = resolveConfig.aliases;
283283
webpackResolveConfig.extensions = resolveExtensions;
284+
// a resolve module might point to an imported component via the package name, in which case
285+
// the package name is a symlink to the imported component. we want it to be resolved as a pkg
286+
webpackResolveConfig.symlinks = false;
284287
return resolveWebpack(partial, filename, directory, webpackResolveConfig);
285288
}
286289

0 commit comments

Comments
 (0)