Skip to content

fix(@angular-devkit/build-angular): serve option merging is being overridden by defaults in schema #15328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const open = require('open');

export type DevServerBuilderOptions = Schema & json.JsonObject;

export const devServerBuildOverriddenKeys: (keyof DevServerBuilderOptions)[] = [
const devServerBuildOverriddenKeys: (keyof DevServerBuilderOptions)[] = [
'watch',
'optimization',
'aot',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
},
"verbose": {
"type": "boolean",
"description": "Adds more details to output logging.",
"default": false
"description": "Adds more details to output logging."
},
"liveReload": {
"type": "boolean",
Expand Down Expand Up @@ -117,7 +116,6 @@
},
"sourceMap": {
"description": "Output sourcemaps.",
"default": true,
"oneOf": [
{
"type": "object",
Expand Down Expand Up @@ -153,8 +151,7 @@
"vendorSourceMap": {
"type": "boolean",
"description": "Resolve vendor packages sourcemaps.",
"x-deprecated": true,
"default": false
"x-deprecated": true
},
"evalSourceMap": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,14 @@ describe('Dev Server Builder', () => {
expect(await response.text()).toContain('<title>HelloWorldApp</title>');
});

it('should not generate sourcemaps when running prod build', async () => {
// Production builds have sourcemaps turned off.
const run = await architect.scheduleTarget({ ...target, configuration: 'production' });
runs.push(run);
const output = await run.result as DevServerBuilderOutput;
expect(output.success).toBe(true);
const hasSourceMaps = output.emittedFiles && output.emittedFiles.some(f => f.extension === '.map');
expect(hasSourceMaps).toBe(false, `Expected emitted files not to contain '.map' files.`);
});

});