0

I would like to build my angular application with the cross origin build option. I am currently using a couple of build options and it works fine (prod and output-hashing). When I attempt to add cross-origin build option in the command line I get the following error: Unknown option --cross-origin (or --crossOrigin depending on how I write it so it is not a case convention issue). If add the the crossOrigin option to the angular.json file under the projects architect build options section then I get the following error: Schema validation failed with the following errors: Data path "" should NOT have additional properties(crossOrigin). I would like to know what is causing this error and how to overcome it.

18
  • Why.... do you think this is even an option..? And what do you expect it to do..? Commented Jul 31, 2020 at 16:23
  • @MikeOne it will allow you to set the different values of your cross origin options angular.io/cli/build#options. Commented Jul 31, 2020 at 16:28
  • Right, never heard of that one 🤪. So this will only fix very specific scenario’s right (stackoverflow.com/questions/18336789/…)? What Angular version are you using? Commented Jul 31, 2020 at 16:37
  • Angular version 7 Commented Jul 31, 2020 at 16:57
  • Right.. it seems that option flag was added in v8.1.. Commented Jul 31, 2020 at 17:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.