Reputation: 2016
Trying to compile an Angular project in Visual Studio Code with ng build
and serve it with ng serve
In both cases got the following error:
Only 'amd' and 'system' modules are supported alongside --outFile
Didn't use --outFile option for compiling and serving so don't really know where the error is.
Also tried to remove "module": "commonjs"
from tsconfig.spec.json as mentioned here but still not working.
Any idea on how to solve this error? Thanks!
Upvotes: 0
Views: 2282
Reputation: 1585
Your configuration includes "outFile": "./dist/out-tsc/app/build.js"
which is equivalent to the --outFile
flag. Remove this line from the configuration and rely on the outDir
only.
Upvotes: 4