WearyMonkey / ngtemplate-loader

Include AngularJS templates in the Webpack bundle and preload the template cache.
MIT License
238 stars 78 forks source link

Module not found: Error: Cannot resolve module 'html' in #8

Closed atgillette closed 9 years ago

atgillette commented 9 years ago

Hi,

I've set the configuration as:

module: { preLoaders: [ { test: /.js$/, loader: 'baggage?[file].html&[file].css'} ], loaders: [ // if you're going to do both ng-cache and normal html loading, comment out the two loaders // and explicitly write the loader type yourself, e.g. require('html!./blah.html') or require('ng-cache!./blah.html') // { test: /.html$/, loader: "ng-cache-loader" }, // { test: /.html$/, loader: "html-loader" }, { test: /.css$/, loader: 'style!css'}, { test: /.scss$/, loader: 'style-loader!css-loader!autoprefixer-loader!sass-loader'}, { test: /.png$/, loader: 'url-loader?limit=100000&mimetype=image/png'}, { test: /.jpg$/, loader: 'file-loader'}, { test: /.html$/, loader: 'ngtemplate-loader?relativeTo=' + __dirname + '/!html'} ] },

But I'm getting the following error when I attempt to require an html template: Module not found: Error: Cannot resolve module 'html'

atgillette commented 9 years ago

Looks like I was missing: { test: /.html$/, loader: "html-loader" },

Closing issue now.