File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export function getProdConfig(wco: WebpackConfigOptions) {
47
47
const swVersion = JSON . parse ( swPackageJson ) [ 'version' ] ;
48
48
49
49
const isLegacySw = semver . satisfies ( swVersion , OLD_SW_VERSION ) ;
50
- const isModernSw = semver . satisfies ( swVersion , NEW_SW_VERSION ) ;
50
+ const isModernSw = semver . gte ( swVersion , NEW_SW_VERSION ) ;
51
51
52
52
if ( ! isLegacySw && ! isModernSw ) {
53
53
throw new Error ( stripIndent `
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import * as fs from 'fs';
5
5
import * as path from 'path' ;
6
6
import * as semver from 'semver' ;
7
7
8
- export const NEW_SW_VERSION = '>= 5.0.0-rc.0' ;
8
+ export const NEW_SW_VERSION = '5.0.0-rc.0' ;
9
9
10
10
class CliFilesystem implements Filesystem {
11
11
constructor ( private base : string ) { }
@@ -58,7 +58,7 @@ export function usesServiceWorker(projectRoot: string): boolean {
58
58
const swPackageJson = fs . readFileSync ( `${ swModule } /package.json` ) . toString ( ) ;
59
59
const swVersion = JSON . parse ( swPackageJson ) [ 'version' ] ;
60
60
61
- return semver . satisfies ( swVersion , NEW_SW_VERSION ) ;
61
+ return semver . gte ( swVersion , NEW_SW_VERSION ) ;
62
62
}
63
63
64
64
export function augmentAppWithServiceWorker ( projectRoot : string , appRoot : string ,
You can’t perform that action at this time.
0 commit comments