enten / udk

Universal Development Kit: Webpack extension which improves universal application development. - THE UDK PROJECT SUPPORT IS CURRENTLY SUSPENDED.
MIT License
29 stars 7 forks source link

How to omit "source-map"? #18

Closed nguyenbathanh closed 3 years ago

nguyenbathanh commented 4 years ago

When running ng serve, I got:

Unknown option: '--source-map'

After a few minutes of Googling, I have tried an another approach with changes of angular.json as below:

...
{
  "serve": {
    "builder": "udk:udk-runner",
    "options": {
      "sourceMap": {
        "scripts": false,
        "styles": false
      }
    },
    "configurations": {}
  }
}
...

When running ng serve, I got these following errors:

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(sourceMap).
enten commented 4 years ago

@nguyenbathanh My apologies for the delay to answer.

This behavior came from angular devkit (architect).

This error trown because sourceMap doesn't exists in udk-runner. As described in its README, there are 2 options only: universalTarget and debug.

If you want to disable source map for you browser build: you need to configure that option inside its builder options.

If you still have this issue, you can partially share your angular.json and I will help you to disable source map.