detect(version) {
        version = parseInt(`${version}`);

        if (!version || isNaN(version)) {
            try {
                return this.detect(require(this.mix.resolve('vue')).version);
            } catch (e) {
                this.mix.logger.error(`${e}`);
                this.fail();
            }
        }

        if (this.supported().includes(version)) {
            return version;
        }

        this.fail();
    }
Detect and validate the current version of Vue for the build.

@param {string|number|null|undefined} [version]
@returns {number}