This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
var path = require('path'); | |
module.exports = { | |
devtool: 'inline-source-map', // This will show line numbers where errors are accured in the terminal | |
devServer: { | |
historyApiFallback: true, // This will make the server understand "/some-link" routs instead of "/#/some-link" | |
}, | |
entry: [ | |
'webpack-dev-server/client?http://127.0.0.1:8080/', // Specify the local server port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WP API</title> | |
</head> | |
<body> | |
<div id="app"></div> <!-- This div will be holding the app --> | |
<script src="bundle.js"></script> <!-- This is the main JS file that gets bundled by webpack --> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "wp-api", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"alt": "^0.18.6", | |
"axios": "^0.15.3", | |
"lodash": "^4.17.4", | |
"react": "^15.4.2", |
NewerOlder