Skip to content

Commit

Permalink
broke style-components example
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Aug 1, 2019
1 parent 4951768 commit 4310fa8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
7 changes: 4 additions & 3 deletions examples/styled-components/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'react-lifecycles-compat';
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import App from './App';

const root = document.createElement('div');
document.body.appendChild(root);
//const root = ;
document.body.appendChild(document.createElement('div'));

render(<App />, root);
render(<App />, document.getElementsByTagName('div')[0]);
19 changes: 17 additions & 2 deletions examples/styled-components/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,24 @@ module.exports = {
module: {
rules: [
{
exclude: /packages/, // should work without exclude
exclude: /node_modules/, // should work without exclude
test: /\.js$/,
use: ['react-hot-loader/webpack', 'babel-loader'],
use: ['babel-loader'],
},
{
include: /node_modules\/react-lifecycles-compat/, // should work without exclude
test: /\.js$/,
use: ['babel-loader'],
},
{
include: /node_modules\/react-dom/,
test: /\.jsx?$/,
use: {
loader: 'react-hot-loader/webpack',
options: {
noRegister: true,
},
},
},
],
},
Expand Down

0 comments on commit 4310fa8

Please sign in to comment.