I can't entirely get the configuration right to make pug work with Aurelia CLI (0.33.1) and am hoping someone knows enough about webpack loaders to help me out. I get the error Failed loading required CSS file: app.styl
.
I've created two minimalist projects using the cli and stylus:
- the cli and standard options (including using stylus)
- same as #1, except modified to support pug
With #1, if I create app.styl
and reference it using a <require from="app.styl"></require>
from within app.html
it loads fine. But with #2 it does not. Any ideas?
Beyond this first issue, my next unresolved issue will be to figure out how to pass locals to index.pug
, given that pug-loader
returns a function and needs apply-loader
in the loader chain.
Repeating code from the sample project:
rules:
{
test: /\.pug$/,
loaders: [
{ loader: 'apply-loader' },
{ loader: 'pug-loader', options: { pretty: true } }
]
},
plugins:
new HtmlWebpackPlugin({
template: 'index.pug',
inject: true, // not sure if this is needed, or why
metadata: {
// wish to make this available in index.pug, but failing
title, server, baseUrl
}
}),
new AureliaPlugin( { viewsExtensions: '.pug' } ),