npm.io
1.0.0 • Published 8 years ago

angular-inliner-loader

Licence
MIT
Version
1.0.0
Deps
1
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Angular inliner loader

npm version

Webpack loader that inlines template and styles in Angular components.

Installing

$ npm install angular-inliner-loader --save

Usage

Chain the angular-inliner-loader to your currently used typescript loader.

loaders: ['awesome-typescript-loader', 'angular-inliner-loader'],

Supported loader options (can be given either via query or options object):

styleSuffix:        Replace style file extensions with given suffix.
templateSuffix:     Replace template file extensions with given suffix.
Example
module: {
  loaders: [
    {
      test: /\.ts$/,
      loaders: ['awesome-typescript-loader', 'angular-inline-loader'],
      exclude: [/\.(spec|e2e)\.ts$/]
    },
    {
      test: /\.(html|css)$/,
      loader: 'raw-loader'
    }
  ]
}

To be able to use the angular-inliner-loader you must have a loader registered, which can handle the template and style files.