mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(android): background color/image handling improvements (#10451)
This commit is contained in:
committed by
GitHub
parent
bb83addb5c
commit
4abcb216da
@@ -161,11 +161,11 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
}
|
||||
if (this.pluginOptions.jitMode) {
|
||||
transformers.before.unshift(
|
||||
require('../transformers/NativeClass').default
|
||||
require('../transformers/NativeClass').default,
|
||||
);
|
||||
} else {
|
||||
transformers.before.push(
|
||||
require('../transformers/NativeClass').default
|
||||
require('../transformers/NativeClass').default,
|
||||
);
|
||||
}
|
||||
args[1] = transformers;
|
||||
@@ -189,7 +189,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
});
|
||||
|
||||
const buildAngularVersion = getDependencyVersion(
|
||||
'@angular-devkit/build-angular'
|
||||
'@angular-devkit/build-angular',
|
||||
);
|
||||
|
||||
if (buildAngularVersion) {
|
||||
@@ -212,7 +212,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
.rule('angular-webpack-loader')
|
||||
.test(/\.[cm]?[tj]sx?$/)
|
||||
.exclude.add(
|
||||
/[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\]/
|
||||
/[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\]/,
|
||||
)
|
||||
.end()
|
||||
.resolve.set('fullySpecified', false)
|
||||
@@ -226,7 +226,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
'build-angular-missing',
|
||||
`
|
||||
@angular-devkit/build-angular is missing! Some features may not work as expected. Please install it manually to get rid of this warning.
|
||||
`
|
||||
`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -281,7 +281,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
},
|
||||
/core\/profiling/,
|
||||
/core\/ui\/styling/,
|
||||
])
|
||||
]),
|
||||
);
|
||||
|
||||
config.optimization.minimizer('TerserPlugin').tap((args) => {
|
||||
@@ -330,10 +330,10 @@ function tryRequireResolve(path: string) {
|
||||
function getWebpackLoaderPath() {
|
||||
return (
|
||||
tryRequireResolve(
|
||||
'@angular-devkit/build-angular/src/babel/webpack-loader'
|
||||
'@angular-devkit/build-angular/src/babel/webpack-loader',
|
||||
) ??
|
||||
tryRequireResolve(
|
||||
'@angular-devkit/build-angular/src/tools/babel/webpack-loader'
|
||||
'@angular-devkit/build-angular/src/tools/babel/webpack-loader',
|
||||
) ??
|
||||
// fallback to angular 16.1+
|
||||
'@angular-devkit/build-angular/src/tools/babel/webpack-loader'
|
||||
|
||||
@@ -87,7 +87,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
const sourceMapAbsolutePath = getProjectFilePath(
|
||||
`./${
|
||||
env.buildPath ?? 'platforms'
|
||||
}/${platform}-sourceMaps/[file].map[query]`
|
||||
}/${platform}-sourceMaps/[file].map[query]`,
|
||||
);
|
||||
const sourceMapRelativePath = relative(outputPath, sourceMapAbsolutePath);
|
||||
config.output.sourceMapFilename(sourceMapRelativePath);
|
||||
@@ -273,7 +273,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
const configFile = tsConfigPath
|
||||
? {
|
||||
configFile: tsConfigPath,
|
||||
}
|
||||
}
|
||||
: undefined;
|
||||
|
||||
// set up ts support
|
||||
@@ -452,7 +452,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
* +-----------------------------------------------------------------------------------------+
|
||||
*/
|
||||
/System.import\(\) is deprecated/,
|
||||
])
|
||||
]),
|
||||
);
|
||||
|
||||
// todo: refine defaults
|
||||
|
||||
Reference in New Issue
Block a user