Ivy 和 CASL 的构建问题

Build issue with Ivy and CASL

我已经尝试在我的项目中为 Angular 安装 CASL。不幸的是,当我尝试启动该应用程序时,收到以下错误消息:

ERROR in /Users/julien/Documents/repositories/frontend/node_modules/@casl/angular/__ivy_ngcc__/dist/es6/index.js
Module build failed (from /Users/julien/Documents/repositories/frontend/node_modules/babel-loader/lib/index.js):
TypeError: /Users/julien/Documents/repositories/frontend/node_modules/@casl/angular/__ivy_ngcc__/dist/es6/index.js: Column must be greater than or equal to 0, got -21
    at BasicSourceMapConsumer.SourceMapConsumer_findMapping [as _findMapping] (/Users/julien/Documents/repositories/frontend/node_modules/source-map/lib/source-map-consumer.js:543:13)
    at BasicSourceMapConsumer.SourceMapConsumer_allGeneratedPositionsFor [as allGeneratedPositionsFor] (/Users/julien/Documents/repositories/frontend/node_modules/source-map/lib/source-map-consumer.js:201:22)
    at /Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/merge-map.js:186:27
    at Array.forEach (<anonymous>)
    at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/Users/julien/Documents/repositories/frontend/node_modules/source-map/lib/source-map-consumer.js:155:14)
    at buildMappingData (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/merge-map.js:147:12)
    at mergeSourceMap (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/merge-map.js:21:17)
    at generateCode (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/generate.js:74:39)
    at run (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/index.js:55:33)
    at run.next (<anonymous>)
    at Function.transform (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transform.js:27:41)
    at transform.next (<anonymous>)
    at step (/Users/julien/Documents/repositories/frontend/node_modules/gensync/index.js:254:32)
    at /Users/julien/Documents/repositories/frontend/node_modules/gensync/index.js:266:13
    at async.call.result.err.err (/Users/julien/Documents/repositories/frontend/node_modules/gensync/index.js:216:11)

我使用的是 angular“10.0.9”的最新版本。如果我完全禁用源映射,那么消息就会消失,但在开发过程中它并不是一个真正的选项。

有什么想法吗?

这是@casl/angular 中的源映射生成错误,已在@casl/angular@4.1.5

中修复

现在,一切正常