简体   繁体   English

Angular-CLI中没有Webpack全新

[英]No webpack in Angular-CLI ng new

I created an app using Angular CLI using: 我使用以下命令使用Angular CLI创建了一个应用程序:

ng new my-app

There is no Webpack configured by default and in Chrome dev tools the .ts files are not showing/mapped so I can only debug the transpiled JS. 默认情况下,没有配置Webpack,在Chrome开发工具中,.ts文件没有显示/映射,因此我只能调试转译的JS。

Why is Webpack not in there by default, has Angular got its own alternative? 为什么默认情况下Webpack不存在,Angular有自己的替代方案?

Is this the reason my .ts files are not mapped properly? 这是我的.ts文件未正确映射的原因吗?

EDIT - after reading @torazaburo 's comment - here is my tsconfig.json: 编辑-阅读@torazaburo的评论后-这是我的tsconfig.json:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2016",
      "dom"
    ]
  }
}

Also to add my coworker went through the same steps as me, I assume, and they have the .ts files served by webpack in chrome dev tools 另外,我想我的同事也经历了与我相同的步骤,并且他们在chrome开发工具中将webpack提供的.ts文件

Installed latest stable Chrome to fix it. 安装了最新的稳定的Chrome来修复它。

I was using Chromium Version 53.0.2785.143 Built on Ubuntu, running on Ubuntu 14.04 (64-bit). 我正在使用Chromium版本53.0.2785.143构建于Ubuntu上,并在Ubuntu 14.04(64位)上运行。 I noticed my colleagues version of Chromium was higher, but since I'm having a bug with Ubuntu software center - I just installed the latest Chrome. 我注意到同事的Chromium版本更高,但是由于我在Ubuntu软件中心遇到了一个错误-我刚刚安装了最新的Chrome。 This solved my issue. 这解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM