@vercube/devkit 0.0.23 → 0.0.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 +14 -11
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -39,9 +39,17 @@ async function getRolldownConfig(ctx) {
|
|
|
39
39
|
const pkg = (await import(resolve(root, "package.json"), { with: { type: "json" } })).default;
|
|
40
40
|
const input = ctx?.entry ?? "src/index.ts";
|
|
41
41
|
const output = ctx?.output?.dir ?? "dist";
|
|
42
|
+
const tsconfig = ctx?.tsconfig ?? "tsconfig.json";
|
|
43
|
+
const dts = ctx?.dts ?? true;
|
|
44
|
+
const customPlugins = ctx?.plugins ?? [];
|
|
45
|
+
const defaultPlugins = [];
|
|
46
|
+
if (dts) defaultPlugins.push(UnpluginIsolatedDecl({
|
|
47
|
+
transformer: "oxc",
|
|
48
|
+
patchCjsDefaultExport: true
|
|
49
|
+
}));
|
|
42
50
|
return {
|
|
43
|
-
input: { index: input },
|
|
44
|
-
tsconfig: resolve(root,
|
|
51
|
+
input: typeof input === "string" ? { index: input } : input,
|
|
52
|
+
tsconfig: resolve(root, tsconfig),
|
|
45
53
|
define: { ...ctx?.define },
|
|
46
54
|
external: [
|
|
47
55
|
...builtinModules,
|
|
@@ -60,10 +68,7 @@ async function getRolldownConfig(ctx) {
|
|
|
60
68
|
onwarn: (warning, warn) => {
|
|
61
69
|
if (!warning.code || !["CIRCULAR_DEPENDENCY"].includes(warning.code)) warn(warning);
|
|
62
70
|
},
|
|
63
|
-
plugins: [
|
|
64
|
-
transformer: "oxc",
|
|
65
|
-
patchCjsDefaultExport: true
|
|
66
|
-
})]
|
|
71
|
+
plugins: [...defaultPlugins, ...customPlugins]
|
|
67
72
|
};
|
|
68
73
|
}
|
|
69
74
|
|
|
@@ -96,11 +101,10 @@ async function build$1(ctx) {
|
|
|
96
101
|
*/
|
|
97
102
|
async function watch$2(app) {
|
|
98
103
|
const bundlerConfig = await getRolldownConfig(app.config.build);
|
|
99
|
-
|
|
104
|
+
watch$1({
|
|
100
105
|
...bundlerConfig,
|
|
101
106
|
onwarn: () => {}
|
|
102
|
-
})
|
|
103
|
-
watcher.on("event", (event) => {
|
|
107
|
+
}).on("event", (event) => {
|
|
104
108
|
switch (event.code) {
|
|
105
109
|
case "START":
|
|
106
110
|
app.hooks.callHook("bundler-watch:init");
|
|
@@ -146,8 +150,7 @@ function getWatchFunc(bundler) {
|
|
|
146
150
|
*/
|
|
147
151
|
async function build(app) {
|
|
148
152
|
const bundler = app?.config?.build?.bundler ?? "rolldown";
|
|
149
|
-
|
|
150
|
-
await build$2(app?.config?.build);
|
|
153
|
+
await getBuildFunc(bundler)(app?.config?.build);
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/devkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "Devkit module for Vercube framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@oxc-project/runtime": "0.
|
|
25
|
+
"@oxc-project/runtime": "0.91.0",
|
|
26
26
|
"consola": "3.4.2",
|
|
27
|
-
"dotenv": "17.2.
|
|
27
|
+
"dotenv": "17.2.2",
|
|
28
28
|
"hookable": "5.5.3",
|
|
29
|
-
"oxc-parser": "0.
|
|
30
|
-
"oxc-transform": "0.
|
|
29
|
+
"oxc-parser": "0.91.0",
|
|
30
|
+
"oxc-transform": "0.91.0",
|
|
31
31
|
"pathe": "2.0.3",
|
|
32
|
-
"rolldown": "1.0.0-beta.
|
|
33
|
-
"unplugin-isolated-decl": "0.15.
|
|
34
|
-
"@vercube/core": "0.0.
|
|
32
|
+
"rolldown": "1.0.0-beta.39",
|
|
33
|
+
"unplugin-isolated-decl": "0.15.2",
|
|
34
|
+
"@vercube/core": "0.0.24"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|