Setup of yarn and package.json. Also added first page which queries api for info
This commit is contained in:
33
client/webpack.config.js
Normal file
33
client/webpack.config.js
Normal 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]
|
||||
}
|
||||
Reference in New Issue
Block a user