summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2016-06-21 20:51:46 +0300
committerYuval Adam <yuval@y3xz.com>2016-06-21 20:51:46 +0300
commitbebde1a43d5604104beed17d81bfcbf446d37880 (patch)
tree1ca329d02dad643dc77354c5a3d93691a580845e
parent346bb353891c7ef1149ab0f9a6721262ab56931d (diff)
Basic webpack config and style loader
-rw-r--r--index.html8
-rw-r--r--index.js1
-rw-r--r--package.json7
-rw-r--r--webpack.config.js12
4 files changed, 27 insertions, 1 deletions
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..6511e4f
--- /dev/null
+++ b/index.html
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <script type="text/javascript" src="bundle.js" charset="utf-8"></script>
+ </body>
+</html>
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..702f19a
--- /dev/null
+++ b/index.js
@@ -0,0 +1 @@
+document.write("It works.");
diff --git a/package.json b/package.json
index 37891c2..9390ae8 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,12 @@
"description": "qrgen.xyz",
"main": "index.js",
"dependencies": {},
- "devDependencies": {},
+ "devDependencies": {
+ "css-loader": "^0.23.1",
+ "style-loader": "^0.13.1",
+ "webpack": "^1.13.1",
+ "webpack-dev-server": "^1.14.1"
+ },
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..feca40a
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,12 @@
+module.exports = {
+ entry: "./index.js",
+ output: {
+ path: __dirname,
+ filename: "bundle.js"
+ },
+ module: {
+ loaders: [
+ { test: /\.css$/, loader: "style!css" }
+ ]
+ }
+};