queckezz / koa-views

Template rendering middleware for koa (hbs, swig, pug, anything! :sparkles:)
MIT License
710 stars 87 forks source link

a proposal #125

Closed fhyoga closed 6 years ago

fhyoga commented 6 years ago

It is recommended to add a configuration item and mount the path of the template file to ctx.

This can support some hacks in the development environment, such as reading the template file compiled by webpack in memory.

I think this is a very common requirement in development. What do you think, if I can mention a PR?

int64ago commented 6 years ago

Cloud you give an example to explain it? I don't understand the relation between the template file compiled and path of the template file.

fhyoga commented 6 years ago

I did not think clearly, I have found another way to solve the problem.

ckrad commented 5 years ago

hello my template file is in memory how can i read it?

fhyoga commented 5 years ago

@ckrad If you are using webpack packaged, you can look at the API of this package.