Skip to content

Commit b8070a5

Browse files
committed
Add webpack demo code
1 parent 5cacb30 commit b8070a5

File tree

9 files changed

+3714
-0
lines changed

9 files changed

+3714
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

webpack_demo/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Follow https://webpack.js.org/guides/getting-started/ (stop at "Using a Configuration").
2+
3+
Run this.
4+
5+
```
6+
npx webpack
7+
```
8+
9+
This will create `dist/main.js`. Then run this.
10+
11+
```
12+
javascript_modules/browser $ python3 -m http.server 1234
13+
```
14+
15+
Finally, go to http://localhost:1234/dist/index.html in your browser.

webpack_demo/dist/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Getting Started</title>
5+
</head>
6+
<body>
7+
<h3>Hello</h3>
8+
<script src="main.js"></script>
9+
</body>
10+
</html>

webpack_demo/dist/main.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)