silgi 0.36.4 → 0.36.6
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/build.mjs +3 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/types.mjs +31 -0
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -229,6 +229,9 @@ async function nextJS(silgi, skip = false) {
|
|
|
229
229
|
eslint: {
|
|
230
230
|
ignoreDuringBuilds: true
|
|
231
231
|
},
|
|
232
|
+
typescript: {
|
|
233
|
+
tsconfigPath: "./.silgi/types/silgi.tsconfig.json"
|
|
234
|
+
},
|
|
232
235
|
output: "standalone"
|
|
233
236
|
};
|
|
234
237
|
await silgi.callHook("nextjs:prepare", {
|
package/dist/cli/index.mjs
CHANGED
package/dist/cli/types.mjs
CHANGED
|
@@ -659,6 +659,10 @@ async function silgiGenerateType(silgi) {
|
|
|
659
659
|
noEmit: true,
|
|
660
660
|
/* If NOT transpiling with TypeScript: */
|
|
661
661
|
module: "Preserve",
|
|
662
|
+
moduleResolution: "bundler",
|
|
663
|
+
useDefineForClassFields: true,
|
|
664
|
+
noImplicitThis: true,
|
|
665
|
+
jsx: "preserve",
|
|
662
666
|
customConditions: silgi.options.typescript.customConditions,
|
|
663
667
|
paths: {
|
|
664
668
|
// '#silgiImports': [
|
|
@@ -720,6 +724,33 @@ async function silgiGenerateType(silgi) {
|
|
|
720
724
|
exclude: [...exclude]
|
|
721
725
|
});
|
|
722
726
|
}
|
|
727
|
+
if (isPresents(["next"])) {
|
|
728
|
+
tsConfig = defu(tsConfig, {
|
|
729
|
+
compilerOptions: {
|
|
730
|
+
incremental: true,
|
|
731
|
+
plugins: [
|
|
732
|
+
{ name: "next" }
|
|
733
|
+
],
|
|
734
|
+
paths: {
|
|
735
|
+
"@/*": [
|
|
736
|
+
relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "src", "*"))
|
|
737
|
+
]
|
|
738
|
+
},
|
|
739
|
+
lib: [
|
|
740
|
+
"dom",
|
|
741
|
+
"dom.iterable",
|
|
742
|
+
"esnext"
|
|
743
|
+
],
|
|
744
|
+
strictNullChecks: true
|
|
745
|
+
},
|
|
746
|
+
include: [
|
|
747
|
+
relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "next-env.d.ts")),
|
|
748
|
+
relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "**", "*.ts")),
|
|
749
|
+
relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "**", "*.tsx")),
|
|
750
|
+
relativeWithDot(tsconfigDir, join(silgi.options.rootDir, ".next", "types", "**", "*.ts"))
|
|
751
|
+
]
|
|
752
|
+
});
|
|
753
|
+
}
|
|
723
754
|
tsConfig.compilerOptions ||= {};
|
|
724
755
|
tsConfig.compilerOptions.paths ||= {};
|
|
725
756
|
tsConfig.include ||= [];
|