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

feat(ssg): make it simple #80

Merged
merged 6 commits into from
Feb 17, 2024
Merged

feat(ssg): make it simple #80

merged 6 commits into from
Feb 17, 2024

Conversation

berlysia
Copy link
Contributor

Based on research in honojs/honox#48

before: Use Vite to build the toSSG generated code. This means that it was built twice.
after: Generate a page with toSSG. That's it.

Copy link

changeset-bot bot commented Feb 16, 2024

🦋 Changeset detected

Latest commit: 25613d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hono/vite-ssg Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

source: data,
})
},
async mkdir() {},
Copy link
Member

Choose a reason for hiding this comment

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

This line throws the eslint error:

Screenshot 2024-02-17 at 8 43 31

How about writing the following to avoid it?

async mkdir() {
  return
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed! 4e24768 (#80)

@@ -45,31 +64,27 @@ export const ssgBuild = (options?: SSGOptions): Plugin => {
throw new Error(`Failed to find a named export "default" from ${entry}`)
}

console.log(`Build files into temp directory: ${tempDir}`)
const outDir = config.build.outDir
Copy link
Member

Choose a reason for hiding this comment

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

Using outDir from Vite's config is good!

@yusukebe
Copy link
Member

Thanks! @berlysia

Great PR! I've left the comments; check them, and could you run yarn changeset on the top of the project? This will be a "minor" change.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

Looks good!

@yusukebe
Copy link
Member

@berlysia

Thank you! I'll merge this now and release the new version!

@yusukebe yusukebe merged commit b577d9c into honojs:main Feb 17, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Feb 17, 2024
@berlysia berlysia deleted the simple-ssg branch February 17, 2024 08:56
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

Successfully merging this pull request may close these issues.

2 participants