Skip to content

Commit fe41c90

Browse files
committed
Fix font paths in CSS
This is an ongoing issue being discueed in webpack-contrib/mini-css-extract-plugin#44 Overriding localPath as suggested in webpack-contrib/mini-css-extract-plugin#44 (comment) is a quick fix, but hardly seems right.
1 parent 17c3b9c commit fe41c90

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

skins/cat17/webpack.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
55

66
// TODO
77
// - Generate styles
8-
// - Fix font paths
98
// - Minify in prod
109
// - Concatenate script assets
1110
// - Copy fonts, pdfs etc
1211
// - use environment configurations (dev, prod)
13-
// - minify images
12+
// - minify images (and make font regex matcher more specific to put the logo SVGs into images folder)
1413
// - build faq (+ vue)
1514
// - replace npm build scripts
1615
// - delete gulpfile & browserify
@@ -40,7 +39,11 @@ const commonConfig = merge( [
4039
test: /\.scss$/,
4140
use: [
4241
{
43-
loader: MiniCssExtractPlugin.loader
42+
// Extract CSS modules into files
43+
loader: MiniCssExtractPlugin.loader,
44+
options: {
45+
publicPath: '../'
46+
}
4447
},
4548
{ loader: "css-loader" }, // translates CSS into CommonJS
4649
{
@@ -49,7 +52,7 @@ const commonConfig = merge( [
4952
options: {
5053
plugins: function () {
5154
return [
52-
require('autoprefixer')
55+
require( 'autoprefixer' )
5356
];
5457
}
5558
}

0 commit comments

Comments
 (0)