File tree Expand file tree Collapse file tree 6 files changed +43
-1
lines changed
test/cases/publicpath-emptystring Expand file tree Collapse file tree 6 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export function pitch(request) {
6868 const childFilename = '*' ; // eslint-disable-line no-path-concat
6969 const publicPath =
7070 typeof options . publicPath === 'string'
71- ? options . publicPath . endsWith ( '/' )
71+ ? options . publicPath === '' || options . publicPath . endsWith ( '/' )
7272 ? options . publicPath
7373 : `${ options . publicPath } /`
7474 : typeof options . publicPath === 'function'
Original file line number Diff line number Diff line change 1+ body { background : red; background-image : url (cd0bb358c45b584743d8ce4991777c42.svg); }
2+
Original file line number Diff line number Diff line change 1+ import './style.css' ;
Original file line number Diff line number Diff line change 1+ body { background : red; background-image : url (./ react.svg); }
Original file line number Diff line number Diff line change 1+ import Self from '../../../src' ;
2+
3+ module . exports = {
4+ entry : './index.js' ,
5+ module : {
6+ rules : [
7+ {
8+ test : / \. c s s $ / ,
9+ use : [
10+ {
11+ loader : Self . loader ,
12+ options : {
13+ publicPath : '' ,
14+ } ,
15+ } ,
16+ 'css-loader' ,
17+ ] ,
18+ } ,
19+ {
20+ test : / \. ( s v g | p n g ) $ / ,
21+ use : [
22+ {
23+ loader : 'file-loader' ,
24+ options : {
25+ filename : '[name].[ext]' ,
26+ } ,
27+ } ,
28+ ] ,
29+ } ,
30+ ] ,
31+ } ,
32+ plugins : [
33+ new Self ( {
34+ filename : '[name].css' ,
35+ } ) ,
36+ ] ,
37+ } ;
You can’t perform that action at this time.
0 commit comments