I have a npm package I want to use for reusable directives and services. But I can't get htmls imported in webpack, typescript environment.

I have a npm package I want to use for reusable directives and services. But I can't get htmls imported in webpack, typescript environment. I tried html-loader with template: require('./directive.html') but it does not work. Please guide me.
You already invited:

Evren

Upvotes from:

You're not using webpack for packaging your reusable directives and services, are you ?
If you do, that's not what you want to be doing. If you're using TS, use TSC to compile TS to JS (es6 is okay) and publish those js and d.ts files to npm.
Next import whatever you need in your application and let the application do the bundling.

If you wanna answer this question please Login or Register