feat: add entryDir helper + update aliases

This commit is contained in:
Igor Randjelovic
2020-11-29 17:44:36 +01:00
parent 6e0407e5e8
commit ca78bc5ae8
10 changed files with 529 additions and 36 deletions

View File

@ -13,6 +13,7 @@ import { WatchStatePlugin } from '../plugins/WatchStatePlugin';
import { IWebpackEnv } from '../index';
import {
getAbsoluteDistPath,
getEntryDirPath,
getEntryPath,
getPlatform,
} from '../helpers/project';
@ -106,9 +107,7 @@ export default function (config: Config, env: IWebpackEnv): Config {
.add('.json');
// base aliases
config.resolve.alias
.set('~', '<TODO>appFullPath')
.set('@', '<TODO>appFullPath');
config.resolve.alias.set('~', getEntryDirPath()).set('@', getEntryDirPath());
// resolve symlinks
config.resolve.symlinks(true);