Skip to content

Commit 34c8515

Browse files
committed
make pulicPath for style/css loader relative to root, so files are always available regardless of base_url
1 parent 8debab3 commit 34c8515

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ module.exports = {
1515
test: /\.css$/,
1616
use: ExtractTextPlugin.extract({
1717
fallback: "style-loader",
18-
use: "css-loader"
18+
use: "css-loader",
19+
// Set publicPath as relative path ("./").
20+
// By default it uses the `output.publicPath` ("/static/dist/"), when it rewrites the URLs in styles.css.
21+
// And it causes these files unavailabe if BinderHub has a different base_url than "/".
22+
publicPath: "./"
1923
})
2024
},
2125
{

0 commit comments

Comments
 (0)