Skip to content

Commit

Permalink
verbose mode for ng serve shows manipulated webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Jan 19, 2019
1 parent 90965c4 commit a532eed
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-build-plus",
"version": "7.7.1",
"version": "7.7.2",
"description": "Extensible Builder for the Angular CLI suitable not only for Angular Elements.",
"license": "MIT",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions lib/src/plus-dev-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class PlusDevServerBuilder extends DevServerBuilderBase {
config = hook(config);
}

if (options.verbose) {
console.debug('modified webpack config', config);
}

return config;
}

Expand Down
7 changes: 7 additions & 0 deletions lib/src/plus-dev-server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
"default": true
},

"verbose": {
"type": "boolean",
"description": "Adds more details to output logging.",
"default": false
},


"browserTarget": {
"type": "string",
Expand Down Expand Up @@ -87,6 +93,7 @@
"type": "string",
"description": "The pathname where the app will be served."
},

"disableHostCheck": {
"type": "boolean",
"description": "Don't verify connected clients are part of allowed hosts.",
Expand Down
3 changes: 0 additions & 3 deletions ngx-build-modern/src/modern-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export default {
pre(builderConfig) {
const options = builderConfig.options;

console.log('cli', cliVersion);
console.log('build', buildAngularVersion);

if (semver.lt(cliVersion, '7.0.0')) {
console.log(chalk.red('ERROR: ngx-build-plus has been tested with CLI 7.0.0 and higher\n'));
}
Expand Down
9 changes: 8 additions & 1 deletion sample/projects/getting-started/webpack.partial.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,12 @@ module.exports = {
new webpack.DefinePlugin({
"VERSION": JSON.stringify("4711")
})
]
],

devServer: {
headers: {
"Access-Control-Allow-Origin": "https://localhost.intranet:8081",
"Access-Control-Allow-Credentials": "true"
}
}
}

0 comments on commit a532eed

Please sign in to comment.