validatePublicPathAndManifestKeyPrefix(webpackConfig) {
        if (webpackConfig.manifestKeyPrefix !== null) {
            // nothing to check - they have manually set the key prefix
            return;
        }

        if (webpackConfig.publicPath.includes('://')) {
            /*
             * If publicPath is absolute, you probably don't want your manifests.json
             * keys to be prefixed with the CDN URL. Instead, we force you to
             * choose your manifestKeyPrefix.
             */

            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().');
        }

        let outputPath = webpackConfig.outputPath;
        // for comparison purposes, change \ to / on Windows
        outputPath = outputPath.replace(/\\/g, '/');

        // remove trailing slash on each
        outputPath = outputPath.replace(/\/$/, '');
        const publicPath = webpackConfig.publicPath.replace(/\/$/, '');

        /*
         * This is a sanity check. If, for example, you are deploying
         * to a subdirectory, then you might have something like this:
         *      outputPath = /var/www/public/build
         *      publicPath = /subdir/build/
         *
         * In that case, you probably don't want the keys in the manifest.json
         * file to be prefixed with /subdir/build - it makes more sense
         * to prefix them with /build, which is the true prefix relative
         * to your application (the subdirectory is a deployment detail).
         *
         * For that reason, we force you to choose your manifestKeyPrefix().
         */
        if (!outputPath.includes(publicPath)) {
            const suggestion = publicPath.substr(publicPath.lastIndexOf('/') + 1) + '/';

            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() (${outputPath}) and setPublicPath() (${publicPath}) containing paths that don't seem compatible.`);
        }
    }
If the manifestKeyPrefix is not set, this uses the publicPath to generate it.

Most importantly, this runs some sanity checks to make sure that it's
ok to use the publicPath as the manifestKeyPrefix.

@param {WebpackConfig} webpackConfig
@returns {void}