Skip to content

Commit fdc09e4

Browse files
committed
Replace error throwing with logger warning when publicPath is not absolute
1 parent bcfbbfd commit fdc09e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/WebpackConfig.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ class WebpackConfig {
125125
setPublicPath(publicPath) {
126126
if (publicPath.includes('://') === false && publicPath.indexOf('/') !== 0) {
127127
// technically, not starting with "/" is legal, but not
128-
// what you want in most cases. Let's not let the user make
129-
// a mistake (and we can always change this later).
130-
throw new Error('The value passed to setPublicPath() must start with "/" or be a full URL (http://...)');
128+
// what you want in most cases. Let's warn the user that
129+
// they might be making a mistake.
130+
logger.warning('The value passed to setPublicPath() should usually start with "/" or be a full URL (http://...)');
131131
}
132132

133133
// guarantee a single trailing slash

0 commit comments

Comments
 (0)