We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4622319 commit d41c2d1Copy full SHA for d41c2d1
Design.md
@@ -40,3 +40,40 @@ nutConfig: {
40
"preset": [ "preset-pages" ]
41
}
42
```
43
+
44
+# Plugin API
45
46
+app.js
47
48
+```js
49
+export default ( ctx, options ) => {
50
+ ctx.api
51
+ ctx.events
52
+ ctx.expose
53
+ ctx.emit
54
+ ctx.on
55
+}
56
+```
57
58
+index.js
59
60
61
+module.exports = function ( ctx, options ) {
62
+ ctx.restart( reason ) only in dev mode
63
+ ctx.refreshBrowser
64
+ ctx.html.addScript before(duration) webpack compile
65
+ ctx.html.addMeta
66
+ ctx.html.addLink
67
+ ctx.html.addStyle
68
+ ctx.writeVirtualModules
69
+ ctx.chainWebpack
70
+ ctx.modifyWebpack
71
+ ctx.middlewares.append
72
+ ctx.middlewares.prepend
73
+ ctx.middlewares.before
74
+ ctx.middlewares.after
75
76
77
78
79
0 commit comments