@hybridly/vite 0.10.0-beta.22 → 0.10.0-beta.24
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/index.mjs +27 -14
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -19,20 +19,25 @@ const CONFIG_PLUGIN_NAME = "vite:hybridly:config";
|
|
|
19
19
|
const RESOLVED_CONFIG_VIRTUAL_MODULE_ID = `\0virtual:hybridly/config`;
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/typegen/index.ts
|
|
22
|
-
|
|
22
|
+
const COMPILER_OPTIONS = {
|
|
23
|
+
target: "esnext",
|
|
24
|
+
module: "esnext",
|
|
25
|
+
moduleResolution: "bundler",
|
|
26
|
+
strict: true,
|
|
27
|
+
skipLibCheck: true,
|
|
28
|
+
sourceMap: true,
|
|
29
|
+
resolveJsonModule: true,
|
|
30
|
+
esModuleInterop: true,
|
|
31
|
+
rootDir: "../",
|
|
32
|
+
noImplicitThis: true,
|
|
33
|
+
noUncheckedIndexedAccess: true,
|
|
34
|
+
allowSyntheticDefaultImports: true
|
|
35
|
+
};
|
|
36
|
+
function generateAppTsConfig(options, config) {
|
|
23
37
|
const tsconfig = {
|
|
24
38
|
compilerOptions: {
|
|
25
|
-
|
|
26
|
-
module: "esnext",
|
|
27
|
-
moduleResolution: "bundler",
|
|
28
|
-
strict: true,
|
|
29
|
-
skipLibCheck: true,
|
|
39
|
+
...COMPILER_OPTIONS,
|
|
30
40
|
jsx: "preserve",
|
|
31
|
-
sourceMap: true,
|
|
32
|
-
resolveJsonModule: true,
|
|
33
|
-
esModuleInterop: true,
|
|
34
|
-
rootDir: "../",
|
|
35
|
-
allowSyntheticDefaultImports: true,
|
|
36
41
|
lib: [
|
|
37
42
|
"esnext",
|
|
38
43
|
"dom",
|
|
@@ -50,16 +55,23 @@ function generateTsConfig(options, config) {
|
|
|
50
55
|
}
|
|
51
56
|
},
|
|
52
57
|
include: [
|
|
58
|
+
"./*.d.ts",
|
|
59
|
+
...config.architecture.namespaces.flatMap((directory) => `../${directory}`),
|
|
53
60
|
...config.components.views.map(({ path }) => `../${path}`),
|
|
54
61
|
...config.components.layouts.map(({ path }) => `../${path}`),
|
|
55
|
-
`../${config.architecture.root_directory}/**/*`,
|
|
56
|
-
"./**/*.d.ts",
|
|
57
62
|
...options.tsconfig?.include ?? []
|
|
58
63
|
],
|
|
59
64
|
exclude: ["../public/**/*", ...options.tsconfig?.exclude ?? []]
|
|
60
65
|
};
|
|
61
66
|
write(JSON.stringify(tsconfig, null, 2), "tsconfig.json");
|
|
62
67
|
}
|
|
68
|
+
function generateNodeTsConfig(options, config) {
|
|
69
|
+
const tsconfig = {
|
|
70
|
+
compilerOptions: COMPILER_OPTIONS,
|
|
71
|
+
include: ["../*.config.ts"]
|
|
72
|
+
};
|
|
73
|
+
write(JSON.stringify(tsconfig, null, 2), "tsconfig.node.json");
|
|
74
|
+
}
|
|
63
75
|
function generateLaravelIdeaHelper(config) {
|
|
64
76
|
const ideJson = {
|
|
65
77
|
$schema: "https://laravel-ide.com/schema/laravel-ide-v2.json",
|
|
@@ -171,7 +183,8 @@ async function loadConfiguration() {
|
|
|
171
183
|
//#endregion
|
|
172
184
|
//#region src/config/index.ts
|
|
173
185
|
var config_default = (options, config) => {
|
|
174
|
-
|
|
186
|
+
generateAppTsConfig(options, config);
|
|
187
|
+
generateNodeTsConfig(options, config);
|
|
175
188
|
generateLaravelIdeaHelper(config);
|
|
176
189
|
generateVueExtensionFile();
|
|
177
190
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hybridly/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.10.0-beta.
|
|
4
|
+
"version": "0.10.0-beta.24",
|
|
5
5
|
"description": "Vite plugin for Hybridly",
|
|
6
6
|
"author": "Enzo Innocenzi <enzo@innocenzi.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vue": "^3.5.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@hybridly/core": "0.10.0-beta.
|
|
50
|
+
"@hybridly/core": "0.10.0-beta.24",
|
|
51
51
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
52
52
|
"fast-glob": "^3.3.3",
|
|
53
53
|
"magic-string": "^0.30.17",
|