Commit 9fff44bd authored by Matija Obreza's avatar Matija Obreza
Browse files

Webpack entrypoint

- Don't watch node_modules
parent e43964a7
......@@ -13,11 +13,10 @@ const ReactLoadable = require('react-loadable/webpack');
const fs = require('fs');
const HOST = process.env.HOST || 'localhost';
const HOST = process.env.HOST || '0.0.0.0';
const PORT = process.env.PORT || 3000;
module.exports = {
stats: {
colors: true
},
......@@ -25,10 +24,13 @@ module.exports = {
devServer: {
hot: true,
inline: true,
contentBase: path.join(__dirname, '../'),
// contentBase: path.join(__dirname, '../'),
compress: true,
port: PORT,
host: HOST,
watchOptions: {
ignored: /node_modules/
},
overlay: {
warnings: true,
errors: true
......@@ -40,7 +42,7 @@ module.exports = {
},
entry: {
gringlobal: [ 'babel-polyfill', './demo/App.tsx' ],
gringlobal: ['babel-polyfill', './demo/entrypoint.tsx'],
},
output: {
......
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />,
document.getElementById('the-app'),
);
......@@ -50,6 +50,9 @@ module.exports = {
compress: true,
port: PORT,
host: HOST,
watchOptions: {
ignored: /node_modules/
},
overlay: {
warnings: true,
errors: true
......
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