File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " monaco-editor-webpack-plugin" ,
3
- "version" : " 7.1.0 " ,
3
+ "version" : " 7.1.1 " ,
4
4
"description" : " A webpack plugin for the Monaco Editor" ,
5
5
"main" : " out/index.js" ,
6
6
"typings" : " ./out/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -296,7 +296,14 @@ function createLoaderRules(
296
296
if(/^(\\/\\/)/.test(result)) {
297
297
result = window.location.protocol + result
298
298
}
299
- var js = '/*' + label + '*/importScripts("' + result + '");';
299
+ var js = '/*' + label + '*/';
300
+ if (typeof import.meta !== 'undefined') {
301
+ // module worker
302
+ js += 'import "' + result + '";';
303
+ } else {
304
+ // classic worker
305
+ js += 'importScripts("' + result + '");';
306
+ }
300
307
var blob = new Blob([js], { type: 'application/javascript' });
301
308
return URL.createObjectURL(blob);
302
309
}
You can’t perform that action at this time.
0 commit comments