Skip to content

Commit 8d55de4

Browse files
committed
Tweaking an error message to recommend a manifest key prefix with no opening slash
This is to match the fact that, by default, there is no opening slash
1 parent 437d54e commit 8d55de4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/config/validator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Validator {
4747
* choose your manifestKeyPrefix.
4848
*/
4949

50-
throw new Error('Cannot determine how to prefix the keys in manifest.json. Call Encore.setManifestKeyPrefix() to choose what path (e.g. /build/) to use when building your manifest keys. This is happening because you passed an absolute URL to setPublicPath().');
50+
throw new Error('Cannot determine how to prefix the keys in manifest.json. Call Encore.setManifestKeyPrefix() to choose what path (e.g. build/) to use when building your manifest keys. This is happening because you passed an absolute URL to setPublicPath().');
5151
}
5252

5353
if (!this.webpackConfig.manifestKeyPrefix) {
@@ -68,7 +68,7 @@ class Validator {
6868
* For that reason, we force you to choose your manifestKeyPrefix().
6969
*/
7070
if (outputPath.indexOf(publicPath) === -1) {
71-
const suggestion = '/' + publicPath.substr(publicPath.lastIndexOf('/') + 1) + '/';
71+
const suggestion = publicPath.substr(publicPath.lastIndexOf('/') + 1) + '/';
7272

7373
throw new Error(`Cannot determine how to prefix the keys in manifest.json. Call Encore.setManifestKeyPrefix() to choose what path (e.g. ${suggestion}) to use when building your manifest keys. This is caused by setOutputPath() and setPublicPath() containing paths that don't seem compatible.`);
7474
}

0 commit comments

Comments
 (0)