Commit a01c4064 authored by Jorgen's avatar Jorgen

Add webpack-dev-server and babel-polyfil. Working now.

parent a28d5d1b
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</head> </head>
<body> <body>
<script src="/dist/etersoft-typos.js"></script>
<noscript> <noscript>
You need to enable JavaScript to run this app. You need to enable JavaScript to run this app.
</noscript> </noscript>
...@@ -86,7 +87,6 @@ ...@@ -86,7 +87,6 @@
</div> </div>
<div id="typos-window"></div> <div id="typos-window"></div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"private": false, "private": false,
"dependencies": { "dependencies": {
"alertify.js": "^1.0.12", "alertify.js": "^1.0.12",
"babel-polyfill": "^6.26.0",
"bootstrap": "^3.3.7", "bootstrap": "^3.3.7",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"react": "^16.4.1", "react": "^16.4.1",
...@@ -11,12 +12,11 @@ ...@@ -11,12 +12,11 @@
"react-dom": "^16.4.1", "react-dom": "^16.4.1",
"react-localization": "^1.0.10" "react-localization": "^1.0.10"
}, },
"scripts": { "scripts": {
"buildDev": "webpack --mode=development --devtool=source-map", "buildDev": "webpack -d --devtool=source-map",
"build": "webpack --mode=production" "build": "webpack --mode=production",
"start": "webpack-dev-server -d --hot --content-base dist/"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-loader": "^7.1.5", "babel-loader": "^7.1.5",
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
"style-loader": "^0.21.0", "style-loader": "^0.21.0",
"url-loader": "^1.0.1", "url-loader": "^1.0.1",
"webpack": "^4.15.1", "webpack": "^4.15.1",
"webpack-command": "^0.4.0" "webpack-cli": "^3.0.8",
"webpack-command": "^0.4.0",
"webpack-dev-server": "^3.1.4"
} }
} }
// Need to include this for ES2015+ features like
// Array.prototype.includes and async/await work
import 'babel-polyfill';
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment