Angular-cli不使用--dev选项生成打字稿文件 [英] Angular-cli not generating typescript files with --dev option

查看:68
本文介绍了Angular-cli不使用--dev选项生成打字稿文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用angular-cli:1.0.0-beta.14,节点:6.6.0,os:win32 x64.当然,这是angular-cli的webpack版本.我可以使用ng build. ng build输出给出了该webpack版本:webpack 2.1.0-beta.22.

Using angular-cli: 1.0.0-beta.14, node: 6.6.0, os: win32 x64. Of course, this is the webpack version of angular-cli. I'm able to use ng build. The ng build output gives this webpack Version: webpack 2.1.0-beta.22.

我想知道为什么当我运行ng build --dev时,TypeScript文件没有被捆绑.我得到了js文件和sourcemaps(不幸的是,这些文件使Chrome阻塞了-我无法解析SourceMap).我认为对于DEV部署,除了源映射之外,我还将获得我开发的打字稿文件.是否有一些有关ng build使用的选项的文档?

I'm wondering why the TypeScript files don't get bundled when I run ng build --dev. I get js files and sourcemaps (which unfortunately Chrome chokes on - I get Failed to parse SourceMap). I would think for a DEV deploy, in addition to source maps, I would get the typescript files I developed. Is there some documentation on the options to be used with ng build?

推荐答案

在此处查看@ vt5491的详细答案:

See @vt5491's detailed answer here:

此外,我相信它只是带有一个-ng b -dev.参见ng help此处:

Also, I beleive it's just ng b -dev with one -. See ng help here:

...

ng build <options...>
  Builds your app and places it into the output path (dist/ by default).
  aliases: b
  --target (String) (Default: development)
    aliases: -t <value>, -dev (--target=development), -prod (--target=production)

...


我们有一个类似的问题,所有样式都放入了index.html<style>标记中.参见:


We have a similar issue with styles being all put into index.html's <style> tags. See:

这篇关于Angular-cli不使用--dev选项生成打字稿文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆