fix: node_module resolution when using relative packages

This commit is contained in:
Igor Randjelovic
2021-04-01 17:00:19 +02:00
parent de13357a09
commit 1025270fad
8 changed files with 70 additions and 0 deletions

View File

@ -137,6 +137,12 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
// resolve symlinks
config.resolve.symlinks(true);
// resolve modules in project node_modules first
// then fall-back to default node resolution (up the parent folder chain)
config.resolve.modules
.add(getProjectFilePath('node_modules'))
.add('node_modules');
config.module
.rule('bundle')
.enforce('post')