You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/07/02 15:52:37 UTC

[GitHub] smnbbrv commented on issue #8493: Angular 6 cannot compile with `ng serve --prod`

smnbbrv commented on issue #8493: Angular 6 cannot compile with `ng serve --prod`
URL: https://github.com/apache/incubator-echarts/issues/8493#issuecomment-401850374
 
 
   I found the fix for me as for now. Still it is a workaround, I cannot explain it, I cannot say it is very stable and the best solution forever but it is better than nothing.
   
   All you need is to remap the path of the echarts to use the minified version of it. See example of the root tsconfig file:
   
   ```ts
   {
     "compileOnSave": false,
     "compilerOptions": {
       "baseUrl": "./",
       "outDir": "./dist/out-tsc",
       "sourceMap": true,
       "declaration": false,
       "moduleResolution": "node",
       "emitDecoratorMetadata": true,
       "experimentalDecorators": true,
       "target": "es5",
       "paths": {
         "echarts": ["node_modules/echarts/dist/echarts.min.js"]
       },
       "typeRoots": [
         "node_modules/@types"
       ],
       "lib": [
         "es2017",
         "dom"
       ]
     }
   }
   ```
   
   With this you can still use the typings and enjoy the AOT build. Actually the build became a bit faster (IMO)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org