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'); ...@@ -13,11 +13,10 @@ const ReactLoadable = require('react-loadable/webpack');
const fs = require('fs'); 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; const PORT = process.env.PORT || 3000;
module.exports = { module.exports = {
stats: { stats: {
colors: true colors: true
}, },
...@@ -25,10 +24,13 @@ module.exports = { ...@@ -25,10 +24,13 @@ module.exports = {
devServer: { devServer: {
hot: true, hot: true,
inline: true, inline: true,
contentBase: path.join(__dirname, '../'), // contentBase: path.join(__dirname, '../'),
compress: true, compress: true,
port: PORT, port: PORT,
host: HOST, host: HOST,
watchOptions: {
ignored: /node_modules/
},
overlay: { overlay: {
warnings: true, warnings: true,
errors: true errors: true
...@@ -40,7 +42,7 @@ module.exports = { ...@@ -40,7 +42,7 @@ module.exports = {
}, },
entry: { entry: {
gringlobal: [ 'babel-polyfill', './demo/App.tsx' ], gringlobal: ['babel-polyfill', './demo/entrypoint.tsx'],
}, },
output: { 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 = { ...@@ -50,6 +50,9 @@ module.exports = {
compress: true, compress: true,
port: PORT, port: PORT,
host: HOST, host: HOST,
watchOptions: {
ignored: /node_modules/
},
overlay: { overlay: {
warnings: true, warnings: true,
errors: 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