Skip to content

Commit

Permalink
fix: output.publicPath validation is too strict (#93)
Browse files Browse the repository at this point in the history
closes #88
  • Loading branch information
nlarche authored and jonathanglasmeyer committed May 20, 2016
1 parent 46c99a0 commit ac24d6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/properties/output/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { notAbsolutePath, absolutePath, urlPart } from '../../types'
export default Joi.object({
filename: notAbsolutePath,
path: absolutePath,
publicPath: urlPart,
publicPath: Joi.alternatives().try([
urlPart,
Joi.string().valid(''),
]),
chunkFilename: notAbsolutePath,
sourceMapFilename: notAbsolutePath,
devtoolModuleFilenameTemplate: [notAbsolutePath, Joi.func()],
Expand Down
3 changes: 2 additions & 1 deletion src/properties/output/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ const validModuleConfigs = [
{ crossOriginLoading: 'anonymous' },
// #17
{ hashDigestLength: 6 }, // undocumented

// #18
{ publicPath: '' },
]

const invalidModuleConfigs = [
Expand Down

0 comments on commit ac24d6e

Please sign in to comment.