teux / ng-cache-loader

Webpack loader to put HTML partials in the Angular's $templateCache.
83 stars 15 forks source link

File name removes every extension #27

Closed bpinto closed 8 years ago

bpinto commented 8 years ago

Hi,

I have the following files template.html.slm and another_template.html and would like to load both with .html extension only as after parsing the files with slm they are only html files.

The current [name] only strips the last extension, how could I achieve this?

bpinto commented 8 years ago

I could get around it with the following configuration:

      {
        test: /\.slm$/,
        loaders: ["ng-cache?prefix=app/assets/templates:**&name=[name]", "slm"]
      },
      {
        test: /\.html$/,
        loaders: ["ng-cache?prefix=app/assets/templates:**&name=[name].[ext]"]
      },