File tree 3 files changed +4
-1
lines changed
packages/vite/src/node/plugins
3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ playground/html/invalid.html
11
11
playground /html /valid.html
12
12
playground /external /public /slash@3.0.0.js
13
13
playground /ssr-html /public /slash@3.0.0.js
14
+ playground /worker /classic-worker.js
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
265
265
}
266
266
if ( injectEnv ) {
267
267
const s = new MagicString ( raw )
268
- s . prepend ( injectEnv )
268
+ s . prepend ( injectEnv + ';\n' )
269
269
return {
270
270
code : s . toString ( ) ,
271
271
map : s . generateMap ( { hires : 'boundary' } ) ,
Original file line number Diff line number Diff line change
1
+ ( ( ) => { } ) ( ) // this is to test `importScripts` injection doesn't break the code
2
+
1
3
let base = `/${ self . location . pathname . split ( '/' ) [ 1 ] } `
2
4
if ( base . endsWith ( '.js' ) || base === `/worker-entries` ) base = '' // for dev
3
5
You can’t perform that action at this time.
0 commit comments