Skip to content

Commit 3ab06aa

Browse files
author
Dimitar Tachev
authored
Merge pull request #5046 from NativeScript/tachev/fix-webpack-check
fix: allow pre-release versions of Webpack plugin 1.3.0
2 parents 4c560c6 + 5afd794 commit 3ab06aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/services/webpack/webpack-compiler-service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
4242
if (message.emittedFiles) {
4343
if (isFirstWebpackWatchCompilation) {
4444
isFirstWebpackWatchCompilation = false;
45-
this.expectedHash = message.hash;
45+
this.expectedHash = message.hash;
4646
return;
4747
}
4848

4949
let result;
5050

5151
if (prepareData.hmr) {
52-
result = this.getUpdatedEmittedFiles(message.emittedFiles, message.chunkFiles, message.hash);
52+
result = this.getUpdatedEmittedFiles(message.emittedFiles, message.chunkFiles, message.hash);
5353
} else {
5454
result = { emittedFiles: message.emittedFiles, fallbackFiles: <string[]>[], hash: "" };
5555
}
@@ -219,7 +219,7 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
219219
} else if (this.$hostInfo.isWindows) {
220220
const minWebpackPluginWithWinSnapshotsVersion = "1.3.0";
221221
const installedWebpackPluginVersion = await this.$packageInstallationManager.getInstalledDependencyVersion(WEBPACK_PLUGIN_NAME, projectData.projectDir);
222-
const hasWebpackPluginWithWinSnapshotsSupport = !!installedWebpackPluginVersion ? semver.gte(installedWebpackPluginVersion, minWebpackPluginWithWinSnapshotsVersion) : true;
222+
const hasWebpackPluginWithWinSnapshotsSupport = !!installedWebpackPluginVersion ? semver.gte(semver.coerce(installedWebpackPluginVersion), minWebpackPluginWithWinSnapshotsVersion) : true;
223223
if (!hasWebpackPluginWithWinSnapshotsSupport) {
224224
this.$errors.fail(`In order to generate Snapshots on Windows, please upgrade your Webpack plugin version (npm i nativescript-dev-webpack@latest).`);
225225
}

0 commit comments

Comments
 (0)