File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 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) {
4747 const swVersion = JSON . parse ( swPackageJson ) [ 'version' ] ;
4848
4949 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 ) ;
5151
5252 if ( ! isLegacySw && ! isModernSw ) {
5353 throw new Error ( stripIndent `
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import * as fs from 'fs';
55import * as path from 'path' ;
66import * as semver from 'semver' ;
77
8- export const NEW_SW_VERSION = '>= 5.0.0-rc.0' ;
8+ export const NEW_SW_VERSION = '5.0.0-rc.0' ;
99
1010class CliFilesystem implements Filesystem {
1111 constructor ( private base : string ) { }
@@ -58,7 +58,7 @@ export function usesServiceWorker(projectRoot: string): boolean {
5858 const swPackageJson = fs . readFileSync ( `${ swModule } /package.json` ) . toString ( ) ;
5959 const swVersion = JSON . parse ( swPackageJson ) [ 'version' ] ;
6060
61- return semver . satisfies ( swVersion , NEW_SW_VERSION ) ;
61+ return semver . gte ( swVersion , NEW_SW_VERSION ) ;
6262}
6363
6464export function augmentAppWithServiceWorker ( projectRoot : string , appRoot : string ,
You can’t perform that action at this time.
0 commit comments