Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文档里对如何使用自定义middleware的描述不够清楚 #104

Closed
luckyjing opened this issue Dec 9, 2017 · 1 comment
Closed

Comments

@luckyjing
Copy link

问题

Describe your problems in as much detail as possible

我尝试使用在项目里自定义middleware,参考文档如下:

执行 dn run demo,控制台将会执次打印 1 2 3,每个中间件的配置选项有两个「保留的名称」

name: 用于指定中间件 package 名称,可以是完整的名称 dn-middleware-xxx 也可以是省略前缀的 xxx
location: 用于指定中间件入口文件的位置,一般用于本地调试,或内置在模板中不想独立发布的中间件

于是我写出如下配置

demo:
  - location: ./middleware/webpack-ssr

执行后提示报错

[18:43:34] Invalid pipeline config

后来我尝试将location改成name

demo:
  - name: ./middleware/webpack-ssr

随后便可以了

建议

这里的文档描述可以再详细一点,具体讲解下自定义middleware的过程 :)

@Houfeng
Copy link
Collaborator

Houfeng commented Dec 11, 2017

稍候完善

@Houfeng Houfeng closed this as completed May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants