File tree Expand file tree Collapse file tree 8 files changed +82
-85
lines changed Expand file tree Collapse file tree 8 files changed +82
-85
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ function Site(props) {
77
77
*/
78
78
const _strip = ( array ) => {
79
79
let anchorTitleIndex = array . findIndex (
80
- ( item ) => item . name . toLowerCase ( ) === 'index.md '
80
+ ( item ) => item . name . toLowerCase ( ) === 'index.mdx '
81
81
) ;
82
82
83
83
if ( anchorTitleIndex !== - 1 ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { PlaceholderComponent } from '../Placeholder/Placeholder';
11
11
import isClient from '../../utilities/is-client' ;
12
12
13
13
// Import Demo Content
14
- import SplashContent from '../../content/index.md ' ;
14
+ import SplashContent from '../../content/index.mdx ' ;
15
15
16
16
// Load Styling
17
17
import './Splash.scss' ;
@@ -55,11 +55,7 @@ const Splash = () => {
55
55
< div className = "splash__section splash__section--dark page__content" >
56
56
< Container >
57
57
< Markdown >
58
- < div
59
- dangerouslySetInnerHTML = { {
60
- __html : SplashContent ,
61
- } }
62
- />
58
+ < SplashContent />
63
59
</ Markdown >
64
60
</ Container >
65
61
</ div >
Original file line number Diff line number Diff line change
1
+ ** src/index.js**
2
+
3
+ ``` js
4
+ import bar from ' ./bar.js' ;
5
+
6
+ bar ();
7
+ ```
Original file line number Diff line number Diff line change
1
+ ** src/bar.js**
2
+
3
+ ``` js
4
+ export default function bar () {
5
+ //
6
+ }
7
+ ```
Original file line number Diff line number Diff line change
1
+ ** [ Without config] ( https://youtu.be/3Nv9muOkb6k?t=21293 ) ** or provide custom ** webpack.config.js**
2
+
3
+ ``` js
4
+ const path = require (' path' );
5
+
6
+ module .exports = {
7
+ entry: ' ./src/index.js' ,
8
+ output: {
9
+ path: path .resolve (__dirname , ' dist' ),
10
+ filename: ' bundle.js' ,
11
+ },
12
+ };
13
+ ```
Original file line number Diff line number Diff line change
1
+ ** page.html**
2
+
3
+ ``` html
4
+ <!DOCTYPE html>
5
+ <html >
6
+ <head >
7
+ <meta charset =" utf-8" />
8
+ ...
9
+ </head >
10
+ <body >
11
+ ...
12
+ <script src =" dist/bundle.js" ></script >
13
+ </body >
14
+ </html >
15
+ ```
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : webpack
3
+ sort : -1
4
+ ---
5
+
6
+ import FirstLeft from ' ../components/Splash/first/left.mdx' ;
7
+ import FirstRigth from ' ../components/Splash/first/right.mdx' ;
8
+ import SecondLeft from ' ../components/Splash/second/left.mdx' ;
9
+ import SecondRight from ' ../components/Splash/second/right.mdx' ;
10
+
11
+ ## Write Your Code
12
+
13
+ <div className = " splash__wrap" >
14
+ <div className = " splash__left" >
15
+ <FirstLeft />
16
+ </div >
17
+ <div className = " splash__right" >
18
+ <FirstRigth />
19
+ </div >
20
+ </div >
21
+
22
+ ## Bundle It
23
+
24
+ <div className = " splash__wrap" >
25
+ <div className = " splash__left" >
26
+ <SecondLeft />
27
+ </div >
28
+ <div className = " splash__right" >
29
+ <SecondRight />
30
+ </div >
31
+ </div >
32
+
33
+ Then run ` webpack ` on the command-line to create ` bundle.js ` .
34
+
35
+ ## Awesome isn't it? Let's dive in!
36
+
37
+ ** [ Get Started] ( /guides/getting-started ) ** quickly in our ** Guides** section, or dig into the ** [ Concepts] ( /concepts ) ** section for more high-level information on the core notions behind webpack.
You can’t perform that action at this time.
0 commit comments