Skip to content

Commit 40b1b91

Browse files
committed
refactor(@angular-devkit/build-angular): remove resourcesOutputPath option from application builder.
This `resourcesOutputPath` option is removed from the application builder. Instead the CSS resources will always be emitted in a directory named `media`. This is preperation to output server and browser bundles in different directories.
1 parent 3ccc96f commit 40b1b91

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

packages/angular_devkit/build_angular/src/builders/application/options.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ export async function normalizeOptions(
9494
? '[name].[hash]'
9595
: '[name]',
9696
media:
97-
options.outputHashing === OutputHashing.All || options.outputHashing === OutputHashing.Media
97+
'media/' + options.outputHashing === OutputHashing.All ||
98+
options.outputHashing === OutputHashing.Media
9899
? '[name].[hash]'
99100
: '[name]',
100101
};
101-
if (options.resourcesOutputPath) {
102-
outputNames.media = path.join(options.resourcesOutputPath, outputNames.media);
103-
}
104102

105103
let fileReplacements: Record<string, string> | undefined;
106104
if (options.fileReplacements) {
@@ -228,6 +226,7 @@ export async function normalizeOptions(
228226
tsconfig,
229227
projectRoot,
230228
assets,
229+
outputDirs,
231230
outputNames,
232231
fileReplacements,
233232
globalStyles,

packages/angular_devkit/build_angular/src/builders/application/schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,6 @@
220220
"type": "string",
221221
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
222222
},
223-
"resourcesOutputPath": {
224-
"type": "string",
225-
"description": "The path where style resources will be placed, relative to outputPath."
226-
},
227223
"aot": {
228224
"type": "boolean",
229225
"description": "Build using Ahead of Time compilation.",

packages/angular_devkit/build_angular/src/builders/browser-esbuild/builder-status-warnings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function logBuilderStatusWarnings(options: BrowserBuilderOptions, context
5656
if (
5757
unsupportedOption === 'namedChunks' ||
5858
unsupportedOption === 'vendorChunk' ||
59+
unsupportedOption === 'resourcesOutputPath' ||
5960
unsupportedOption === 'deployUrl'
6061
) {
6162
context.logger.warn(

0 commit comments

Comments
 (0)