2017-12-05 6 views
0

私は会社全体のさまざまなWebプロジェクトで使用するためにUIコンポーネントを開発しています。私たちはローカルリポジトリにnpmパッケージとしてui-componentsを公開したいと思っています。パッケージworks fineを公開しています。UIコンポーネントを角型でエクスポートする - テンプレートが見つかりません

パッケージをインストールするときは、app.module.tsにモジュールをインポートし、 'ng serve'(Angular CLI Project)を実行してください。すべてがうまくコンパイルされます。ローカルホスト上のサイトにアクセスするときしかし、何も示されていないと、コンソールは述べていますされています

enter image description here

はなぜ角度は、それらがコンパイルされ、パッケージ化されている場合、HTML形式のテンプレートを探していますか?これらのコンポーネントが既にコンパイルされていることをCLIに伝える方法はありますか?

{ 
    "compilerOptions": { 
     "baseUrl": ".", 
     "declaration": true, 
     "stripInternal": true, 
     "experimentalDecorators": true, 
     "emitDecoratorMetadata": true, 
     "strictNullChecks": true, 
     "noImplicitAny": true, 
     "module": "es2015", 
     "moduleResolution": "node", 
     "paths": { 
     "@angular/core": ["node_modules/@angular/core"], 
     "@angular/common": ["node_modules/@angular/common"], 
     "@angular/forms": ["node_modules/@angular/forms"], 
     "@ng-bootstrap/ng-bootstrap": ["node_modules/@ng-bootstrap/ng-bootstrap"] 
     }, 
     "rootDir": ".", 
     "outDir": "dist", 
     "sourceMap": true, 
     "inlineSources": true, 
     "target": "es5", 
     "skipLibCheck": true, 
     "lib": [ 
     "es2015", 
     "dom" 
     ] 
    }, 
    "files": [ 
     "index.ts" 
    ], 
    "angularCompilerOptions": { 
     "strictMetadataEmit": true 
    } 
} 

は、私はインターネット上でangularCompilerOptionsためのドキュメントを見つけることができませんでした(梱包前)


tsconfig.json ...

NPMパッケージnode_modulesの場合:

enter image description here


私はbutton.component.ngfactory.jsでCSS-クラスを検索することにより、ボタン・テンプレートが見つかりましたが、エクスポートButtonComponentNgFactoryはどこにも輸入しないことのようです。

答えて

関連する問題