-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
As is, the behavior of the GET /probot
HTML template is brittle and non-flexible:
// views/probot.js
const { name, version } = require(`${process.cwd()}/package`);
module.exports.template = `
...
`
// index.js
const { template } = require("./views/probot");
...
// `template` is rendered on `GET /probot`
-
It relies on the presence of a
package
module inprocess.cwd()
at import time. This reliance seems unnecessary, and is also undocumented in theREADME
. -
This
require
statement is not compatible with webpack, which cannot handle a dynamic import like this.
Thoughts on updating this behavior to be configurable, or swapping the require
for a safer file read?
Metadata
Metadata
Assignees
Labels
No labels