This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(index): don't concat
options.outputPath
and options.publicPath
(
#246)
- Loading branch information
1 parent
9ee8332
commit 98bf052
Showing
5 changed files
with
159 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,55 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Options outputPath {Function} 1`] = `"module.exports = __webpack_public_path__ + \\"test/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";"`; | ||
exports[`Options outputPath {Function} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"output_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = __webpack_public_path__ + \\"9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; | ||
|
||
exports[`Options outputPath {String} 1`] = `"module.exports = __webpack_public_path__ + \\"/test/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";"`; | ||
exports[`Options outputPath {Function} with \`publicPath\` {Function} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"output_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = \\"public_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; | ||
|
||
exports[`Options outputPath {Function} with \`publicPath\` {String} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"output_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = \\"public_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; | ||
|
||
exports[`Options outputPath {String} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"output_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = __webpack_public_path__ + \\"9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; | ||
|
||
exports[`Options outputPath {String} with \`publicPath\` {Function} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"output_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = \\"public_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; | ||
|
||
exports[`Options outputPath {String} with \`publicPath\` {String} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"output_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = \\"public_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Options publicPath {Function} 1`] = `"module.exports = \\"test/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";"`; | ||
exports[`Options publicPath {Function} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = \\"public_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; | ||
|
||
exports[`Options publicPath {String} 1`] = `"module.exports = \\"/test/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";"`; | ||
exports[`Options publicPath {String} 1`] = ` | ||
Object { | ||
"assets": Array [ | ||
"9c87cbf3ba33126ffd25ae7f2f6bbafb.png", | ||
], | ||
"source": "module.exports = \\"public_path/9c87cbf3ba33126ffd25ae7f2f6bbafb.png\\";", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98bf052
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a breaking change in behavior. The application I'm working on relied on this behavior, and updating from
0.11.2
to2.0.0
broke our setup, and it took me 5 hours to figure out what the problem was. I had to had 2 versions of this module, and do a bunch ofconsole.log
in the module's source code, in order to figure out the problem. I wish this had been released as a major new version, instead of a bug fix.98bf052
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tnguyen14 you use buggy behavior, so it was fix
98bf052
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evilebottnawi The idea behind a breaking version number in semver, is that it represents a breaking/ backward-incompatible change, whether that change is a result of a new feature or a bug fix.