finds.dev

TheLarkInn/angular2-template-loader

Chain-to loader for webpack that inlines all html and style's in angular2 components.

View on GitHub

★ 206JavaScriptMITupdated Jul 2020

// the take

A webpack loader that rewrites Angular component metadata — swapping `templateUrl` and `styleUrls` string literals into `require()` calls so webpack can bundle them. It was useful during the Angular 2 beta/RC era when the Angular CLI didn't exist yet. Today the CLI handles all of this out of the box.

Tiny, single-purpose implementation that's easy to audit — the entire logic is in one `index.js`. Has test fixtures covering edge cases like multiple styles, spacing, and URLs without leading `./`. The `keepUrl=true` option is a thoughtful escape hatch for file-loader workflows.

Dead project — last commit in 2020, targeting tooling patterns from 2016. The Angular CLI has made this entirely unnecessary; nobody setting up a new Angular project would reach for a custom webpack loader. Operates via regex on source text rather than a proper AST, so malformed or unusual decorator syntax will silently produce broken output. No TypeScript source, just a loose JS file with no type safety.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
206
Forks
70
Language
JavaScript
License
MIT
Last commit
21 Jul 2020

// nearby

If angular2-template-loader isn't quite it.

All repos →