Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
No se pudo resolver js al construir la biblioteca Angular

La tarea general es envolver algunas bibliotecas UMD de terceros en una biblioteca Angular y mejorarlas con escritura fuerte.

Quiero evitar que el usuario de la biblioteca tenga que agregar manualmente las bibliotecas UMD en su proyecto e incluirlas mediante la etiqueta <script> , por ejemplo.

Considere el siguiente proyecto de ejemplo:

estructura del proyecto

tsconfig.lib.json:

 "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/lib", "allowJs": true, "declaration": true, "declarationMap": true, "inlineSources": true, "types": [] }, "exclude": [ "src/test.ts", "**/*.spec.ts" ] }

prueba-lib.servicio.ts:

 import { Injectable } from '@angular/core'; import * as extLib from './external/externalLib'; @Injectable({ providedIn: 'root' }) export class TestLibService { private n: string = ''; constructor() { } getStringFromNumber(n: number) { this.n = extLib.getString(n); } }

Al ejecutar ng build me sale el siguiente error: error

¿Qué me estoy perdiendo?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!