@lvce-editor/extension-host-worker 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2405,25 +2405,12 @@ const getExtensionId = extension => {
2405
2405
  return '<unknown>';
2406
2406
  };
2407
2407
 
2408
- const getAssetDir = () => {
2409
- // @ts-ignore
2410
- if (typeof ASSET_DIR !== 'undefined') {
2411
- // @ts-ignore
2412
- return ASSET_DIR;
2413
- }
2414
- if (platform === Electron) {
2415
- return '../../../../..';
2416
- }
2417
- return '';
2418
- };
2419
- const assetDir = getAssetDir();
2420
-
2421
2408
  const getUrlPrefix = extensionPath => {
2422
2409
  if (extensionPath.startsWith('http://') || extensionPath.startsWith('https://')) {
2423
2410
  return extensionPath;
2424
2411
  }
2425
2412
  if (platform === Web) {
2426
- return `${assetDir}${extensionPath}`;
2413
+ return extensionPath;
2427
2414
  }
2428
2415
  return `/remote${extensionPath}`;
2429
2416
  };
@@ -2528,6 +2515,19 @@ class BabelParseError extends SyntaxError {
2528
2515
  }
2529
2516
  }
2530
2517
 
2518
+ const getAssetDir = () => {
2519
+ // @ts-ignore
2520
+ if (typeof ASSET_DIR !== 'undefined') {
2521
+ // @ts-ignore
2522
+ return ASSET_DIR;
2523
+ }
2524
+ if (platform === Electron) {
2525
+ return '../../../../..';
2526
+ }
2527
+ return '';
2528
+ };
2529
+ const assetDir = getAssetDir();
2530
+
2531
2531
  const loadBabelParser = () => {
2532
2532
  const url = `${assetDir}/js/babel-parser.js`;
2533
2533
  return import(url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "main": "dist/extensionHostWorkerMain.js",
6
6
  "type": "module",