Skip to content

Commit ac24d6e

Browse files
nlarchejonathanglasmeyer
authored andcommitted
fix: output.publicPath validation is too strict (#93)
closes #88
1 parent 46c99a0 commit ac24d6e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/properties/output/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import { notAbsolutePath, absolutePath, urlPart } from '../../types'
44
export default Joi.object({
55
filename: notAbsolutePath,
66
path: absolutePath,
7-
publicPath: urlPart,
7+
publicPath: Joi.alternatives().try([
8+
urlPart,
9+
Joi.string().valid(''),
10+
]),
811
chunkFilename: notAbsolutePath,
912
sourceMapFilename: notAbsolutePath,
1013
devtoolModuleFilenameTemplate: [notAbsolutePath, Joi.func()],

src/properties/output/index.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const validModuleConfigs = [
3939
{ crossOriginLoading: 'anonymous' },
4040
// #17
4141
{ hashDigestLength: 6 }, // undocumented
42-
42+
// #18
43+
{ publicPath: '' },
4344
]
4445

4546
const invalidModuleConfigs = [

0 commit comments

Comments
 (0)