File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import styles from './index.module.css' ;
22import { version } from '#theme/config' ;
33import Logo from '../../Icons/Webpack' ;
4- export default ( ) => {
4+ export default ( { children } ) => {
55 return (
66 < section className = { styles . hero } >
77 < div className = { styles . webpackContainer } >
@@ -20,6 +20,8 @@ export default () => {
2020 splitting allows for loading parts of the application on demand —
2121 designed for modern JavaScript apps.
2222 </ p >
23+ { /* rendering the code block described at root index.md*/ }
24+ < div className = { styles . codeWrapper } > { children } </ div >
2325
2426 < div className = { styles . actions } >
2527 < a href = "/guides/getting-started" className = { styles . primaryBtn } >
Original file line number Diff line number Diff line change 4040}
4141
4242.preTitle {
43- @apply mb-4
43+ @apply mb-2
4444 flex
4545 items-center
4646 justify-center
6464}
6565
6666.title {
67- @apply mb-4
67+ @apply mb-2
6868 font-normal
6969 text-5xl
7070 leading-[1.1 ]
7777}
7878
7979.subtext {
80- @apply mb-8
80+ @apply mb-6
8181 text-lg
8282 leading-relaxed
8383 text-neutral-800
8484 dark:text-neutral-500;
8585}
8686
87+ .codeWrapper {
88+ @apply mb-8
89+ w-full
90+ max-w-[26rem ]
91+ mx-auto
92+ lg:mx-0
93+ text-left;
94+ }
95+
8796.actions {
8897 @apply flex
8998 items-center
Original file line number Diff line number Diff line change 11import Footer from '../../components/Footer' ;
22import NavBar from '../../components/NavBar' ;
3- import Hero from '../../components/HomePage/Hero' ;
43import FeaturesSection from '../../components/HomePage/FeaturesSection' ;
54import HomeSponsorSection from '../../components/HomePage/HomeSponsorSection' ;
6- import ConfigSection from '../../components/HomePage/ConfigSection' ;
75
86export default ( { metadata, children } ) => {
97 return (
108 < >
119 < NavBar metadata = { metadata } />
12- < Hero />
13- < ConfigSection > { children } </ ConfigSection >
10+ { /* rendering hero + configSection described at root index.md*/ }
11+ { children }
1412 < FeaturesSection />
1513 < HomeSponsorSection />
1614 < Footer />
Original file line number Diff line number Diff line change @@ -3,6 +3,32 @@ layout: home
33mdx : true
44---
55
6+ <Hero >
7+
8+ ``` bash displayName="npm"
9+ npm install webpack webpack-cli --save-dev
10+ ```
11+
12+ ``` bash displayName="yarn"
13+ yarn add webpack webpack-cli --dev
14+ ```
15+
16+ ``` bash displayName="pnpm"
17+ pnpm add webpack webpack-cli -D
18+ ```
19+
20+ ``` bash displayName="bun"
21+ bun add -d webpack webpack-cli
22+ ```
23+
24+ ``` bash displayName="deno"
25+ deno add npm:webpack npm:webpack-cli
26+ ```
27+
28+ </Hero >
29+
30+ <ConfigSection >
31+
632``` javascript displayName="webpack.config.js"
733const path = require (' path' );
834
@@ -44,3 +70,5 @@ const config: Configuration = {
4470
4571export default config ;
4672` ` `
73+
74+ </ConfigSection>
Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ export default {
8282 '#theme/Navigation' : join ( ROOT , 'components/NavBar.jsx' ) ,
8383 '#theme/Footer' : join ( ROOT , 'components/Footer/index.jsx' ) ,
8484 '#theme/Logo' : join ( ROOT , 'components/Icons/Webpack.jsx' ) ,
85+ '#theme/Home/Hero' : join ( ROOT , 'components/HomePage/Hero/index.jsx' ) ,
86+ '#theme/Home/ConfigSection' : join (
87+ ROOT ,
88+ 'components/HomePage/ConfigSection/index.jsx'
89+ ) ,
90+ } ,
91+ components : {
92+ Hero : '#theme/Home/Hero' ,
93+ ConfigSection : '#theme/Home/ConfigSection' ,
8594 } ,
8695 lightningcss : {
8796 resolver : {
You can’t perform that action at this time.
0 commit comments