小编S. *_* C.的帖子

同一项目内相对导入的 NX 错误

在同一项目中使用 TS 别名路径时出现错误:Projects should use relative imports to import from other files within the same project

我不想要这种行为。知道如何禁用吗?

我尝试使用该@nrwl/nx/enforce-module-boundaries选项,但它几乎没有关于其选项的文档

// NX doesn't like this line which uses a path to a file within the
// same NX project. It wants me to use relative pathing, which I
// don't want to use
import { fooHandler } from '@handlers/foo';
Run Code Online (Sandbox Code Playgroud)

node.js monorepo nrwl nrwl-nx nxjs

7
推荐指数
1
解决办法
4240
查看次数

标签 统计

monorepo ×1

node.js ×1

nrwl ×1

nrwl-nx ×1

nxjs ×1