Skip to content

Commit 3495fb8

Browse files
feat: support runtime config
1 parent f1fae05 commit 3495fb8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/plugin.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ export default (ctx, inject) => {
3838
...getHeaders(ctx)
3939
}
4040

41-
const echo = new Echo(options)
41+
// runtimeConfig
42+
const runtimeConfig = ctx.$config && ctx.$config.echo || {}
43+
44+
const echo = new Echo({
45+
...options,
46+
...runtimeConfig
47+
})
4248

4349
<% if (options.authModule) { %>
4450
if (ctx.app.$auth) {

0 commit comments

Comments
 (0)