未验证 提交 52fd6b18 编写于 作者: M Maël Nison 提交者: GitHub

Allows multiple lines for `Module not found` errors (#10797)

Next is currently removing useful information from the PnP error messages.

Before:

```
Module not found: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
```

After:

```
Module not found: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies

Required package: foo (via "foo/components/Avatar")
Required by: /home/arcanis/foo/bar.tsx
```
上级 846ec740
......@@ -86,6 +86,7 @@ function formatMessage(message) {
lines[1]
.replace('Error: ', '')
.replace('Module not found: Cannot find file:', 'Cannot find file:'),
...lines.slice(2).filter((line) => line.indexOf(' @ ') !== 0),
]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册