0

我正在关注https://angular.io/guide/aot-compiler教程,一切都很好,直到汇总部分。

当我运行时:

"node_modules/.bin/rollup"  -c rollup-config.js

我得到这些错误:

The following options have been renamed — please update your config: options.entry -> options.input, options.dest -> options.output.file, options.format -> options.output.format

src/main.ts → src/build.js...
The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string
[!] Error: Unexpected token
aot\src\app\app.module.ngfactory.ts (43:57)
41: import * as import32 from './all-holiday-requests/all-holiday-requests.component.ngfactory';
42: import * as import33 from '../../../src/app/app.component';
43: class AppModuleInjector extends import0.ɵNgModuleInjector<import1.AppModule> {
                                                             ^
44:   _NgProbeToken_2:any[];
45:   _ɵg_3:import2.ɵg;

在此之前,我得到了这个:

The following options have been renamed — please update your config: options.entry -> options.input, options.dest -> options.output.file, options.format -> options.output.format

src/main.ts → src/build.js...
The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string
[!] Error: Could not resolve '../aot/src/app/app.module.ngfactory' from src\main.ts
Error: Could not resolve '../aot/src/app/app.module.ngfactory' from src\main.ts
    at error (D:\DEV\mdAutocomplete - test\node_modules\rollup\dist\rollup.js:185:14)
    at then.resolvedId (D:\DEV\mdAutocomplete - test\node_modules\rollup\dist\rollup.js:9776:8)

所以我改变了

main.ts

import { AppModuleNgFactory } from '../aot/src/app/app.module.ngfactory';

import { AppModuleNgFactory } from '../aot/src/app/app.module.ngfactory.ts';

也许那是一个错误。提前感谢您的帮助:)

4

0 回答 0