我正在使用rollupjs
作为新ionic2@RC.0
版本的一部分。该项目使用tsconfig.json
withcompilerOptions.module = "es2015"
而不是,"commonjs"
它对我来说是全新的。
// typescript
import { AgmCoreModule } from 'angular2-google-maps/core';
我import
从汇总中收到此错误
[17:40:45] typescript compiler finished in 8.08 s
[17:40:45] bundle dev started ...
[17:40:55] Error: Module .../node_modules/angular2-google-maps/core/index.js does not export AgmCoreModule (imported by .../.tmp/shared/shared.module.js)
at Module.trace (.../node_modules/rollup/dist/rollup.js:7677:29)
at ModuleScope.findDeclaration
...
导入文件看起来像这样
// index.d.ts
/**
* angular2-google-maps - Angular 2 components for Google Maps
* @version v0.14.0
* @link https://github.com/SebastianM/angular2-google-maps#readme
* @license MIT
*/
export * from './directives';
export * from './services';
export * from './map-types';
export { LatLngBounds, LatLng, LatLngLiteral, MapTypeStyle } from './services/google-maps-types';
export * from './core-module';
// index.js
/**
* angular2-google-maps - Angular 2 components for Google Maps
* @version v0.14.0
* @link https://github.com/SebastianM/angular2-google-maps#readme
* @license MIT
*/
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
// main modules
__export(require('./directives'));
__export(require('./services'));
// Google Maps types
// core module
__export(require('./core-module'));
//# sourceMappingURL=index.js.map
我可以将我的导入更改为
import { AgmCoreModule } from 'angular2-google-maps/core/core-modules';
并且rollup
没有抱怨,但angular2
没有找到从导入的指令angular2-google-maps/core
我应该怎么办?