@evjs/webpack-plugin 0.0.1-alpha.7 → 0.0.1-alpha.9
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/AGENT.md +38 -0
- package/package.json +5 -4
package/AGENT.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @evjs/webpack-plugin
|
|
2
|
+
|
|
3
|
+
Webpack adapter for the ev framework. Thin wrapper over `@evjs/build-tools`.
|
|
4
|
+
|
|
5
|
+
## EvWebpackPlugin
|
|
6
|
+
|
|
7
|
+
Auto-discovers `"use server"` files, generates a server entry, spawns a Node-targeted child compiler, and emits `manifest.json`.
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
const { EvWebpackPlugin } = require("@evjs/webpack-plugin");
|
|
11
|
+
|
|
12
|
+
new EvWebpackPlugin({
|
|
13
|
+
server: {
|
|
14
|
+
appFactory: "@evjs/runtime/server#createApp", // default
|
|
15
|
+
runner: process.env.NODE_ENV === "development"
|
|
16
|
+
? "@evjs/runtime/server#runNodeServer" : undefined,
|
|
17
|
+
setup: [], // extra imports
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Options
|
|
23
|
+
| Option | Type | Default | Description |
|
|
24
|
+
|--------|------|---------|-------------|
|
|
25
|
+
| `server.appFactory` | `string` | `"@evjs/runtime/server#createApp"` | App factory module ref |
|
|
26
|
+
| `server.runner` | `string?` | `undefined` | Runner for self-starting server bundles |
|
|
27
|
+
| `server.setup` | `string[]` | `[]` | Extra imports prepended to server entry |
|
|
28
|
+
|
|
29
|
+
## server-fn-loader
|
|
30
|
+
|
|
31
|
+
Webpack loader for `"use server"` files. Auto-detects client vs server compiler context.
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
{ loader: "@evjs/webpack-plugin/server-fn-loader" }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Client compiler → replaces function bodies with RPC stubs.
|
|
38
|
+
Server compiler → keeps bodies, appends registrations, reports to manifest.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evjs/webpack-plugin",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.9",
|
|
4
4
|
"description": "Webpack plugin and loaders for the ev framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"prepublishOnly": "npm run build"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"esm"
|
|
27
|
+
"esm",
|
|
28
|
+
"AGENT.md"
|
|
28
29
|
],
|
|
29
30
|
"keywords": [
|
|
30
31
|
"ev",
|
|
@@ -35,8 +36,8 @@
|
|
|
35
36
|
"author": "xusd320",
|
|
36
37
|
"license": "MIT",
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@evjs/build-tools": "0.0.1-alpha.
|
|
39
|
-
"@evjs/manifest": "0.0.1-alpha.
|
|
39
|
+
"@evjs/build-tools": "0.0.1-alpha.9",
|
|
40
|
+
"@evjs/manifest": "0.0.1-alpha.9"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"typescript": "^5.7.3",
|