@salesforcedevs/dx-components 1.29.0-ssgalpha3 → 1.29.0-ssgalpha4
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.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BundledLanguage, BundledTheme, HighlighterCore } from "shiki";
|
|
2
|
-
import { getShikiModule, getBracketsModule } from "
|
|
2
|
+
import { getShikiModule, getBracketsModule } from "dxUtils/shikiLoader";
|
|
3
3
|
import { getCustomLanguageGrammars } from "dxUtils/shikiGrammars";
|
|
4
4
|
|
|
5
5
|
async function getShiki() {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type { ShikiModule, BracketsModule } from "
|
|
1
|
+
import type { ShikiModule, BracketsModule } from "dxUtils/shikiLoaderStatic";
|
|
2
2
|
|
|
3
3
|
export type { ShikiModule, BracketsModule };
|
|
4
4
|
|
|
5
|
-
const USE_STATIC_IMPORT = process.env.SHIKI_STATIC_IMPORT === "
|
|
5
|
+
const USE_STATIC_IMPORT = process.env.SHIKI_STATIC_IMPORT === "true";
|
|
6
6
|
|
|
7
7
|
export async function getShikiModule(): Promise<ShikiModule> {
|
|
8
8
|
if (USE_STATIC_IMPORT) {
|
|
9
|
-
const loader = await import("
|
|
9
|
+
const loader = await import("dxUtils/shikiLoaderStatic");
|
|
10
10
|
return loader.getShikiModule();
|
|
11
11
|
} else {
|
|
12
|
-
const loader = await import("
|
|
12
|
+
const loader = await import("dxUtils/shikiLoaderDynamic");
|
|
13
13
|
return loader.getShikiModule();
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export async function getBracketsModule(): Promise<BracketsModule> {
|
|
18
18
|
if (USE_STATIC_IMPORT) {
|
|
19
|
-
const loader = await import("
|
|
19
|
+
const loader = await import("dxUtils/shikiLoaderStatic");
|
|
20
20
|
return loader.getBracketsModule();
|
|
21
21
|
} else {
|
|
22
|
-
const loader = await import("
|
|
22
|
+
const loader = await import("dxUtils/shikiLoaderDynamic");
|
|
23
23
|
return loader.getBracketsModule();
|
|
24
24
|
}
|
|
25
25
|
}
|