Angular使用webpack吗?webpack配置文件在哪里?

9
在Angular(Angular 7版本)中,
import { Component } from '@angular/core';

我看到了代码中的import,这是表示Angular使用Webpack工具。Webpack配置文件在哪里?

我需要了解Webpack才能成功使用Angular吗?

1个回答

22

我看到代码里有import关键字,这是否意味着Angular使用了webpack?

不是。这意味着它使用标准的TypeScript / EcmaScript导入方式。不过Angular CLI 确实使用了Webpack。

webpack配置文件在哪里?

没有。Webpack的配置被Angular CLI隐藏了。

我需要学习Webpack才能成功使用Angular吗?

不需要。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接