Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

fix targetPath regexp #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Ream extends Event {
const html = await this.renderer.renderToString(context)
const { start, end } = await renderTemplate(context)
const targetPath = this.resolveOutDir(
`generated/${route.replace(/\/?$/, '/index.html')}`
`generated/${route.replace(/(\/?$|\/?\?.*$)/, '/index.html')}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it rather be something like /\/?(\?.*)?$/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will fix it.

)

logger.status(emoji.progress, `generating ${route}`)
Expand Down