ng-cache-loader icon indicating copy to clipboard operation
ng-cache-loader copied to clipboard

Bug: Cannot use 'ng-cache' loader without params

Open osrecki opened this issue 8 years ago • 0 comments

Affected versions webpack: 3.10.0 ng-cache-loader: >= 0.0.24

Webpack config

{
    test: /\.html$/,
    loader: 'ng-cache',
    ...
}

Error

Module build failed: TypeError: Cannot read property 'prefix' of null

Workaround Append ? to loader:

    loader: 'ng-cache?'

loader-utils#getOptions returns null on empty this.query. Prior to version 0.0.24, loader-utils#parseQuery was used, which returned {} on empty this.query.

Workaround is simple, but I still consider it a bug.

osrecki avatar Feb 09 '18 14:02 osrecki