Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-tooling-modules): new module resolution (#1087)
* fix(ui5-tooling-modules): properly resolve and match modules in the bundle * feat(ui5-tooling-modules): support browser object for dependencies in package.json * fix(ui5-tooling-modules): avoid lookup when nod node_modules found * feat(ui5-tooling-modules): new module resolution * feat(ui5-tooling-modules): consider package.json mappings * fix(ui5-tooling-modules): fix existsSyncWithCase on Windows * fix(ui5-tooling-modules): performance improvements * fix(ui5-tooling-modules): windows compatibility of caches * fix(ui5-tooling-modules): support linked projects for require.resolve * fix(ui5-tooling-modules): only include depPaths of linked projects --- The new module resolution utilizes the Node.js resolution algorithm. Especially, the handling of the entry points: https://nodejs.org/api/packages.html#package-entry-points and the mapping defined in the browser field in the `package.json` ensures a consistent bundling experience. The module resolution has been centralized in the `resolveModule` function. This is the central place which ensures a consistent module resolution for all places in the `ui5-tooling-modules` script. In addition, the feature implements several caches to avoid unnecessary expensive lookups.
- Loading branch information