silgi 0.24.24 → 0.25.0
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/dist/cli/index.mjs
CHANGED
|
@@ -1873,7 +1873,7 @@ async function prepareCoreFile(data, frameworkContext, silgi) {
|
|
|
1873
1873
|
plugins.push(pluginImportName);
|
|
1874
1874
|
}
|
|
1875
1875
|
const importsContent = [
|
|
1876
|
-
'import
|
|
1876
|
+
'import { mergeDeep } from "silgi/runtime"',
|
|
1877
1877
|
...Object.entries(importItems).map(([_name, { from, import: imports }]) => {
|
|
1878
1878
|
if (silgi.options.typescript.removeFileExtension) {
|
|
1879
1879
|
from = from.replace(/\.(js|ts|mjs|cjs|jsx|tsx)$/, "");
|
|
@@ -1885,8 +1885,6 @@ async function prepareCoreFile(data, frameworkContext, silgi) {
|
|
|
1885
1885
|
""
|
|
1886
1886
|
];
|
|
1887
1887
|
const importData = [
|
|
1888
|
-
"",
|
|
1889
|
-
"const mergeDeep = deepmerge({all: true})",
|
|
1890
1888
|
"",
|
|
1891
1889
|
"export async function buildSilgi(framework: FrameworkContext, moduleOptions?: Partial<SilgiRuntimeOptions>,buildOptions?: Partial<SilgiOptions>) {",
|
|
1892
1890
|
"",
|
|
@@ -1903,18 +1901,13 @@ async function prepareCoreFile(data, frameworkContext, silgi) {
|
|
|
1903
1901
|
" modulesURIs,",
|
|
1904
1902
|
` plugins: [${plugins.join(", ")}],`,
|
|
1905
1903
|
_data._silgiConfigs.length > 0 ? ` ${_data._silgiConfigs.map((config) => typeof config === "string" ? config : typeof config === "object" ? Object.entries(config).map(([key, value]) => `${key}: ${value}`).join(",\n ") : "").join(",\n ")},` : "",
|
|
1906
|
-
" options: mergeDeep(",
|
|
1907
|
-
" {",
|
|
1904
|
+
" options: mergeDeep(cliConfigs, {",
|
|
1908
1905
|
" runtimeConfig: {} as SilgiRuntimeOptions,",
|
|
1909
1906
|
" routeRules: routeRules as any,",
|
|
1910
|
-
|
|
1911
|
-
" moduleOptions
|
|
1912
|
-
"
|
|
1913
|
-
|
|
1914
|
-
" ...cliConfigs,",
|
|
1915
|
-
" },",
|
|
1916
|
-
" buildOptions,",
|
|
1917
|
-
" ) as any,",
|
|
1907
|
+
` present: '${silgi.options.preset}',`,
|
|
1908
|
+
" ...moduleOptions,",
|
|
1909
|
+
" ...buildOptions,",
|
|
1910
|
+
" }) as any,",
|
|
1918
1911
|
" })",
|
|
1919
1912
|
"",
|
|
1920
1913
|
...frameworkContext,
|