Skip to content

Commit 9ef1de0

Browse files
committed
fix: publicpath-function test demonstrates purpose
With output of the CSS into a nested folder the computation of the relative publicPath makes sense.
1 parent 0f76012 commit 9ef1de0

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

test/cases/publicpath-function/index.js

-1
This file was deleted.

test/cases/publicpath-function/webpack.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ const Self = require('../../../');
22
const path = require('path')
33

44
module.exports = {
5-
entry: './index.js',
5+
entry: {
6+
// Specific CSS entry point, with output to a nested folder
7+
'nested/style': './nested/style.css',
8+
},
69
module: {
710
rules: [
811
{
@@ -11,6 +14,7 @@ module.exports = {
1114
{
1215
loader: Self.loader,
1316
options: {
17+
// Compute publicPath relative to the CSS output
1418
publicPath: (resourcePath, context) => path.relative(path.dirname(resourcePath), context) + '/',
1519
}
1620
},

0 commit comments

Comments
 (0)