I’ve just created a new CLI project with Webpack & Typescript.
I’ve manually added a minimal bootstrap CSS file to index.ejs
in order to have some basic styles available during app strart up (JS loading, processing etc.):
<html>
<head>
...
<link rel="stylesheet" href="assets/app-bootstrapper.css" />
...
</head>
<body aurelia-app="main">
...
</body>
</html>
Also I’ve added some plugin to webpack.config.js
to copy my assets
folder to dist
during build:
// ...
...when(production || server, new CopyWebpackPlugin([
{ from: 'src/assets', to: path.resolve(outDir, 'assets') }])),
// ...
1) Is this basically the correct way to go?
I’ve read this post but setting extractCss: true
as mentioned there doesn’t seem to have any effect…
2) How can I also apply CSS processing to the bootstrap file?
All CSS in my app which is required by views is processed using PostCSS (right now only auto-prefixer
) but my app-bootstrapper.css
is not.
How can I also include app-bootstrapper.css
in the processings?