@genesislcap/vite-builder 14.144.1-alpha-82ebae3.0 → 14.144.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.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/package.json +3 -3
- package/src/index.ts +12 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAM3D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;8BAEwB,YAAY;AAAvC,wBAmJE"}
|
package/dist/index.js
CHANGED
|
@@ -32,8 +32,7 @@ const handlebars_1 = require("./handlebars");
|
|
|
32
32
|
* This has the added benefit of aligning with the current production app builds.
|
|
33
33
|
*/
|
|
34
34
|
exports.default = (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
-
|
|
36
|
-
const { config: { app: { rootElement }, env, http, }, dirs: { cwd }, cli: { isDev, isBuild, isAnalyze, options: { open }, }, pkg: { description }, resolve: { alias }, } = ctx;
|
|
35
|
+
const { config: { app: { rootElement }, env, http, }, dirs: { cwd }, cli: { isDev, isBuild, isAnalyze, options: { open, https }, }, pkg: { description }, resolve: { alias }, } = ctx;
|
|
37
36
|
const define = (0, build_kit_1.resolveDefineConfig)(env, http, 'vite');
|
|
38
37
|
const handlebars = yield (0, handlebars_1.getHandlebarsModule)();
|
|
39
38
|
const config = {
|
|
@@ -139,7 +138,9 @@ exports.default = (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* (
|
|
|
139
138
|
if (isDev) {
|
|
140
139
|
const server = yield (0, vite_1.createServer)(Object.assign(Object.assign({}, config), { configFile: false, server: {
|
|
141
140
|
open,
|
|
142
|
-
port: (
|
|
141
|
+
port: (0, build_kit_1.getPort)(ctx.pkg),
|
|
142
|
+
proxy: (0, build_kit_1.createDevProxies)(),
|
|
143
|
+
https: https ? (0, build_kit_1.getDevCertOptions)() : undefined,
|
|
143
144
|
} }));
|
|
144
145
|
yield server.listen();
|
|
145
146
|
server.printUrls();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/vite-builder",
|
|
3
3
|
"description": "Vite builder",
|
|
4
|
-
"version": "14.144.1
|
|
4
|
+
"version": "14.144.1",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dev": "tsc -b ./tsconfig.json -w"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@genesislcap/build-kit": "14.144.1
|
|
17
|
+
"@genesislcap/build-kit": "14.144.1",
|
|
18
18
|
"consola": "^3.0.2",
|
|
19
19
|
"copyfiles": "^2.4.1",
|
|
20
20
|
"tslib": "^2.3.1",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "35ac01f58ce5a5502d34247e49ab93d0888cd3f7"
|
|
37
37
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { resolve, relative } from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createDevProxies,
|
|
5
|
+
getDevCertOptions,
|
|
6
|
+
getPort,
|
|
7
|
+
run,
|
|
8
|
+
resolveBin,
|
|
9
|
+
resolveDefineConfig,
|
|
10
|
+
} from '@genesislcap/build-kit';
|
|
4
11
|
import type { BuildContext } from '@genesislcap/build-kit';
|
|
5
12
|
import consola from 'consola';
|
|
6
13
|
import { createServer } from 'vite';
|
|
@@ -44,7 +51,7 @@ export default async (ctx: BuildContext) => {
|
|
|
44
51
|
isDev,
|
|
45
52
|
isBuild,
|
|
46
53
|
isAnalyze,
|
|
47
|
-
options: { open },
|
|
54
|
+
options: { open, https },
|
|
48
55
|
},
|
|
49
56
|
pkg: { description },
|
|
50
57
|
resolve: { alias },
|
|
@@ -165,7 +172,9 @@ export default async (ctx: BuildContext) => {
|
|
|
165
172
|
configFile: false,
|
|
166
173
|
server: {
|
|
167
174
|
open,
|
|
168
|
-
port: ctx.pkg
|
|
175
|
+
port: getPort(ctx.pkg),
|
|
176
|
+
proxy: createDevProxies(),
|
|
177
|
+
https: https ? getDevCertOptions() : undefined,
|
|
169
178
|
},
|
|
170
179
|
});
|
|
171
180
|
await server.listen();
|