@evjs/cli 0.0.25 → 0.0.27
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/README.md +4 -4
- package/dist/index.js +2 -2
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -29,8 +29,8 @@ No configuration file is needed. `ev dev` and `ev build` work out of the box wit
|
|
|
29
29
|
|
|
30
30
|
### `ev dev`
|
|
31
31
|
|
|
32
|
-
Uses
|
|
33
|
-
1. **
|
|
32
|
+
Uses bundler Node API directly (no temp config files):
|
|
33
|
+
1. **dev server** (port 3000) — client bundle with HMR.
|
|
34
34
|
2. **Node API Server** (port 3001) — auto-starts when server bundle is emitted, uses `node --watch`.
|
|
35
35
|
|
|
36
36
|
### `ev build`
|
|
@@ -79,7 +79,7 @@ my-app/
|
|
|
79
79
|
|
|
80
80
|
## Common Mistakes
|
|
81
81
|
|
|
82
|
-
1. **Don't create `
|
|
82
|
+
1. **Don't create `custom bundler config file`** — use `ev.config.ts` instead
|
|
83
83
|
2. **Don't install webpack manually** — it's a dependency of `@evjs/cli`
|
|
84
84
|
3. **Config file must be `ev.config.ts`** — not `evjs.config.ts`
|
|
85
85
|
4. **Import `defineConfig` from `@evjs/ev`** — not from `@evjs/server`
|
|
@@ -89,4 +89,4 @@ my-app/
|
|
|
89
89
|
Users do NOT need to install these — they're included in `@evjs/cli`:
|
|
90
90
|
- `webpack`, `webpack-dev-server`
|
|
91
91
|
- `html-webpack-plugin`, `swc-loader`, `@swc/core`
|
|
92
|
-
- `@evjs/bundler-
|
|
92
|
+
- `@evjs/bundler-utoopack`, `@evjs/build-tools`
|
package/dist/index.js
CHANGED
|
@@ -94,7 +94,7 @@ export async function dev(userConfig, options) {
|
|
|
94
94
|
const cwd = options?.cwd ?? process.cwd();
|
|
95
95
|
process.env.NODE_ENV ??= "development";
|
|
96
96
|
// Collect plugin hooks
|
|
97
|
-
const pluginCtx = { mode: "development", config };
|
|
97
|
+
const pluginCtx = { mode: "development", cwd, config };
|
|
98
98
|
const hooks = await collectPluginHooks(config.plugins, pluginCtx);
|
|
99
99
|
// Run buildStart hooks
|
|
100
100
|
await runBuildStartHooks(hooks);
|
|
@@ -192,7 +192,7 @@ export async function build(userConfig, options) {
|
|
|
192
192
|
const cwd = options?.cwd ?? process.cwd();
|
|
193
193
|
process.env.NODE_ENV ??= "production";
|
|
194
194
|
// Collect plugin hooks
|
|
195
|
-
const pluginCtx = { mode: "production", config };
|
|
195
|
+
const pluginCtx = { mode: "production", cwd, config };
|
|
196
196
|
const hooks = await collectPluginHooks(config.plugins, pluginCtx);
|
|
197
197
|
// Run buildStart hooks
|
|
198
198
|
await runBuildStartHooks(hooks);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evjs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "CLI and configuration layer for the evjs framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@evjs/bundler-utoopack": "*",
|
|
32
|
-
"@evjs/bundler-webpack": "*",
|
|
33
32
|
"@evjs/ev": "*",
|
|
34
33
|
"@logtape/logtape": "^2.0.4",
|
|
35
34
|
"commander": "^12.1.0",
|