File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,14 @@ export default function swPlugin(options) {
68
68
// In development, we bundle to IIFE via Rollup, but use WMR's HTTP server to transpile dependencies:
69
69
id = path . resolve ( options . cwd , id . slice ( 4 ) ) ;
70
70
71
+ let rollup ;
71
72
try {
72
- var { rollup } = await import ( 'rollup' ) ;
73
+ // eslint-disable-next-line no-unused-vars
74
+ rollup = ( await import ( 'rollup' ) ) . rollup ;
73
75
} catch ( e ) {
74
- console . error (
75
- ( e = 'Error: Service Worker compilation requires that you install Rollup:\n npm i --save-dev rollup' )
76
- ) ;
77
- return `export default null; throw ${ JSON . stringify ( e ) } ;` ;
76
+ const msg = 'Error: Service Worker compilation requires that you install Rollup:\n npm i --save-dev rollup' ;
77
+ console . error ( msg ) ;
78
+ return `export default null; throw ${ JSON . stringify ( msg ) } ;` ;
78
79
}
79
80
80
81
const bundle = await rollup ( {
You can’t perform that action at this time.
0 commit comments