Setup of yarn and package.json. Also added first page which queries api for info

This commit is contained in:
2017-06-02 12:04:43 +02:00
parent 76b8c46197
commit f548dba7e1
8 changed files with 1262 additions and 9 deletions

33
client/webpack.config.js Normal file
View File

@@ -0,0 +1,33 @@
/*
* @Author: KevinMidboe
* @Date: 2017-06-01 19:09:16
* @Last Modified by: KevinMidboe
* @Last Modified time: 2017-06-01 22:11:51
*/
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: './app/index.html',
filename: 'index.html',
inject: 'body'
})
module.exports = {
entry: './app/index.js',
output: {
path: path.resolve('dist'),
filename: 'index_bundle.js'
},
devServer: {
headers: { "Access-Control-Allow-Origin": "*" }
},
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ }
]
},
plugins: [HtmlWebpackPluginConfig]
}