File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " monaco-editor-webpack-plugin" ,
3- "version" : " 7.1.0 " ,
3+ "version" : " 7.1.1 " ,
44 "description" : " A webpack plugin for the Monaco Editor" ,
55 "main" : " out/index.js" ,
66 "typings" : " ./out/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -296,7 +296,14 @@ function createLoaderRules(
296296 if(/^(\\/\\/)/.test(result)) {
297297 result = window.location.protocol + result
298298 }
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+ }
300307 var blob = new Blob([js], { type: 'application/javascript' });
301308 return URL.createObjectURL(blob);
302309 }
You can’t perform that action at this time.
0 commit comments