Skip to content

Commit 26b0087

Browse files
author
AshwinH
committed
Adds example-5
1 parent f81f90c commit 26b0087

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed

codes/example-5/content.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello webpack");

codes/example-5/entry.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
console.log("Hello World");
2+
3+
require("./style.css");
4+
5+
console.log(require("./content.js"));

codes/example-5/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Example 5</title>
6+
</head>
7+
<body>
8+
<script type="text/javascript" src="bundle.js"></script>
9+
</body>
10+
</html>

codes/example-5/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background: blue;
3+
}

codes/example-5/webpack.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
entry: './entry.js',
3+
output: {
4+
path: __dirname,
5+
filename: 'bundle.js'
6+
},
7+
"module": {
8+
loaders: [{
9+
test: /\.css$/,
10+
loader: 'style!css'
11+
}]
12+
}
13+
};

0 commit comments

Comments
 (0)