Skip to content

feat: add home page - #149

Merged
avivkeller merged 9 commits into
webpack:mainfrom
TusharThakur04:feat/home-page
Jun 30, 2026
Merged

feat: add home page#149
avivkeller merged 9 commits into
webpack:mainfrom
TusharThakur04:feat/home-page

Conversation

@TusharThakur04

@TusharThakur04 TusharThakur04 commented Jun 19, 2026

Copy link
Copy Markdown
Member

Closes: #96
Summary
This PR adds the Home Page

What kind of change does this PR introduce?
feat

Did you add tests for your changes?
no

Does this PR introduce a breaking change?
no

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Use of AI
used for discussion and repetitive tasks

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-doc-kit Ready Ready Preview, Comment Jun 28, 2026 2:25pm

Request Review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure we should have a "Trusted By" section. I think we'd be the first project in the foundation to do that. I'd rather avoid it for now.

That said, I do think we should add a sponsors section to the homepage, since that actually provides value to our sponsors.

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@avivkeller wdyt ?, i just replicated the reference u pasted in #96

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

They are brands and they may or may not use us (I have no idea about most of them), but naming them kind of gives the impression that “we’ve already talked to them to have them there” (and it’s also marketing for them, while many of them don’t give us anything in return).

Also, it doesn’t really bring benefits. It’s better to focus on sponsors, since they actually provide funding that helps us keep going.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@TusharThakur04 The image I showed was a demo, but if Sebastian doesn't think it fits, we can remove it. What if we replace it with, as he said "Sponsored by"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sure, just wanted to confirm.
as we have whole separate page for the sposors, i was thinking of adding the BackerWall and a link to the sponsors page
wdyt?

const [isCopied, setIsCopied] = useState(false);

const handleCopy = async () => {
const textToCopy = activeSyntax === 'js' ? jsCode : mjsCode;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We also support configuration files written in TypeScript

import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
const __dirname = path.dirname(fileURLToPath(import.meta.url));

entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
path: path.resolve(__dirname, 'dist')
path: path.resolve(import.meta.dirname, 'dist')


import styles from './index.module.css';

import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rather than adding a needless dependency, I've opened nodejs/doc-kit#845 to allow us to supply this via Markdown.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

will it work ? because the HomeLayout is all react driven and index.md only exposes the layout prop so that homelayout can be displayed at the root level.

@avivkeller avivkeller Jun 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Theoretically, it should

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you try using the branch to test it? That way, we'll know whether it would work

@avivkeller avivkeller Jun 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can, just waiting for the doc-kit PR to land, but I can set up a #-based npm install to test

@ovflowd

ovflowd commented Jun 24, 2026

Copy link
Copy Markdown
Member

I feel that the home page should be pretty simple. Think of nodejs.org, but even simpler as all it is needed is a npm i webpack. (maybe with multiple tabs per package manager) but I wouldn't add sponsors to home page, and keep home page a simple hero.

@avivkeller

Copy link
Copy Markdown
Member

@TusharThakur04 MDX support landed

@avivkeller

Copy link
Copy Markdown
Member

@ovflowd I like the bigger design with more basic info on config, sponsors, etc

@bjohansebas

Copy link
Copy Markdown
Member

I feel that the home page should be pretty simple. Think of nodejs.org, but even simpler as all it is needed is a npm i webpack. (maybe with multiple tabs per package manager) but I wouldn't add sponsors to home page, and keep home page a simple hero.

I actually prefer the current design. I don't think following the Node.js design is a good idea, and I think sponsors should be part of the homepage, similar to ESLint or Vue.js. We should give value to that money, and the homepage is naturally the most visited page. We already have a separate sponsors page, but that's a different thing and doesn't replace having a small sponsors section on the homepage. That said, I think this is more of a TSC decision, and it's something we should discuss internally.

@TusharThakur04

TusharThakur04 commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@avivkeller now code block is rendering through the doc-kit mdx support and i have also pushed the homesponsors section, happy to revert if tsc doesnt want it

Comment thread pages/index.md Outdated
Comment thread pages/index.md Outdated
Comment thread components/HomePage/ConfigSection/index.jsx Outdated
Comment thread components/HomePage/FeaturesSection/index.jsx Outdated
Comment thread components/HomePage/Hero/index.jsx Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we share a lot of this logic with the main sponsors section, i.e. import helpers from there?

Comment thread components/Icons/WebpackSVG.jsx Outdated
Comment thread layouts/Home/index.jsx Outdated
Comment thread layouts/Home/index.jsx Outdated
Comment thread components/HomePage/HomeSponsorSection/index.jsx Outdated
Comment thread pages/index.md
Comment on lines +10 to +17
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(\_\_dirname, 'dist'),
},
mode: 'production',
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you fix the indentation here?

Comment thread pages/index.md Outdated
Comment thread components/HomePage/HomeSponsorSection/index.module.css Outdated
@avivkeller

Copy link
Copy Markdown
Member

@bjohansebas can you re-review?

@ovflowd

ovflowd commented Jun 30, 2026

Copy link
Copy Markdown
Member
image

can we increase the width of the codebox to the left? So the box size doesn't shift on the different snippets?

@ovflowd

ovflowd commented Jun 30, 2026

Copy link
Copy Markdown
Member
image

titles should be CommonJS, ESM, TypeScript

@avivkeller

Copy link
Copy Markdown
Member
image

titles should be CommonJS, ESM, TypeScript

That's a doc kit bug, not one here

@bjohansebas bjohansebas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@ovflowd

ovflowd commented Jun 30, 2026

Copy link
Copy Markdown
Member
image

Should have a 2nd line with the quick npm/pnpm/etc install path, like others have

@TusharThakur04

TusharThakur04 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author
image can we increase the width of the codebox to the left? So the box size doesn't shift on the different snippets?

i think styling of codeblock is at the doc-kit side

@TusharThakur04

Copy link
Copy Markdown
Member Author
image Should have a 2nd line with the quick npm/pnpm/etc install path, like others have

i am gonna build the download page too, i can modify this later with a link to download page, wdyt?

@ovflowd

ovflowd commented Jun 30, 2026

Copy link
Copy Markdown
Member
image titles should be CommonJS, ESM, TypeScript

That's a doc kit bug, not one here

Is it? Doesn't it support the custom titles?

@ovflowd

ovflowd commented Jun 30, 2026

Copy link
Copy Markdown
Member
image Should have a 2nd line with the quick npm/pnpm/etc install path, like others have

i am gonna build the download page too, i can modify this later with a link to download page, wdyt?

Strong -1, competitors and friends such as eslint have the download piece right on the home page. I don't think we need a download page at all, I think I already shared this before. This isn't like Node.js where we have multiple install paths. This is for all intends and purposes and for all variants a single line npm i webpack, pnpm i webpack, yarn add webpack we don't need a dedicated page for that 😅

@TusharThakur04

Copy link
Copy Markdown
Member Author

i always thought we did, as described in #7 under milestone 4 (core pages) , i will surely modify the home page to incorporate the installation process

@TusharThakur04

TusharThakur04 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

although we have an installation guide
i will add a link to this instead

@ovflowd

ovflowd commented Jun 30, 2026

Copy link
Copy Markdown
Member

i always thought we did, as described in #7 under milestone 4 (core pages) , i will surely modify the home page to incorporate the installation process

@avivkeller was that a mishap? I thought we agreed from the go that no download page would be added?

@bjohansebas

Copy link
Copy Markdown
Member

although we have an installation guide
i will add a link to this instead

That page should be updated to recommend create-webpack-app and remove references to webpack 4.

@avivkeller

Copy link
Copy Markdown
Member

i always thought we did, as described in #7 under milestone 4 (core pages) , i will surely modify the home page to incorporate the installation process

@avivkeller was that a mishap? I thought we agreed from the go that no download page would be added?

When we originally created the milestones, we included it. I'm still in favor of having a dedicated page we can link to for downloads. Should the main page change, we don't want installation information to be seemingly 'moved'.

@avivkeller

Copy link
Copy Markdown
Member
image

titles should be CommonJS, ESM, TypeScript

That's a doc kit bug, not one here

Is it? Doesn't it support the custom titles?

Not currently, no, I'm tracking the bug, I marked it good first issue, but I can just resolve it myself.

@avivkeller
avivkeller merged commit fb59e0e into webpack:main Jun 30, 2026
9 checks passed
@avivkeller

avivkeller commented Jun 30, 2026

Copy link
Copy Markdown
Member

I know we have a few open discussion points, but I'm landing this since, it completes what it was designed to do, and no one is 'against' this changeset.

We can add the nitty gritty (eg download information) separately with more discussion.

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.

Home Page

5 participants