static-dev / spike-tpl-roots

spike template with jade, stylus, and coffeescript
Other
3 stars 0 forks source link

How to use spike-records with pug-static-loader? #5

Open luminarious opened 7 years ago

luminarious commented 7 years ago

The method written in spike-records fails:

test: /\.pug$/,
      use: [{
        loader: 'pug-static-loader',
        options: {
          pretty: true,
          locals: () => locals
        }
      }]

Error:

ModuleBuildError: Module build failed: ValidationError: child "locals" fails because ["locals" must be an object]
jescalan commented 7 years ago

locals: locals -- don't pass it as a function, as the error mentions 😁