mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 10:01:08 +08:00
feat(webpack): angular 16.1 support (#10317)
This commit is contained in:
16
packages/webpack5/scripts/resolver.js
Normal file
16
packages/webpack5/scripts/resolver.js
Normal file
@ -0,0 +1,16 @@
|
||||
const { relative, join } = require('path');
|
||||
|
||||
const packagesToMakeRelative = new Set([
|
||||
'@angular-devkit/build-angular/src/tools/babel/webpack-loader',
|
||||
'@angular-devkit/build-angular/src/babel/webpack-loader',
|
||||
]);
|
||||
|
||||
function resolver(path, options) {
|
||||
const defaultResolver = options.defaultResolver(path, options);
|
||||
if (typeof defaultResolver === 'string' && packagesToMakeRelative.has(path)) {
|
||||
return join('<rootDir>', relative(join(__dirname, '..'), defaultResolver));
|
||||
}
|
||||
return defaultResolver;
|
||||
}
|
||||
|
||||
module.exports = resolver;
|
Reference in New Issue
Block a user