File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ title: webpack
6
6
7
7
<div class =" splash__wrap " >
8
8
<div class =" splash__left " >
9
- __ app .js__
9
+ __ src/app .js__
10
10
11
11
``` js
12
12
import bar from ' ./bar' ;
15
15
```
16
16
</div >
17
17
<div class =" splash__right " >
18
- __ bar .js__
18
+ __ src/bar .js__
19
19
20
20
``` js
21
21
export default function bar () {
@@ -30,12 +30,15 @@ export default function bar() {
30
30
31
31
<div class =" splash__wrap " >
32
32
<div class =" splash__left " >
33
- Without config or provide custom __ webpack.config.js__
33
+ __ Without config __ or provide custom __ webpack.config.js__
34
34
35
35
``` js
36
+ const path = require (' path' );
37
+
36
38
module .exports = {
37
- entry: ' ./app.js' ,
39
+ entry: ' ./src/ app.js' ,
38
40
output: {
41
+ path: path .resolve (__dirname , ' dist' ),
39
42
filename: ' bundle.js'
40
43
}
41
44
};
@@ -52,7 +55,7 @@ __page.html__
52
55
</head >
53
56
<body >
54
57
...
55
- <script src =" bundle.js" ></script >
58
+ <script src =" dist/ bundle.js" ></script >
56
59
</body >
57
60
</html >
58
61
```
You can’t perform that action at this time.
0 commit comments