Skip to content

18 react hot loader implementation - #69

Merged
brauliodiez merged 22 commits into
18_React_Hot_Loader_Startfrom
18_React_Hot_Loader_Implementation
Aug 24, 2016
Merged

brauliodiez merged 22 commits into
18_React_Hot_Loader_Startfrom
18_React_Hot_Loader_Implementation

Conversation

@brauliodiez

Copy link
Copy Markdown
Member

Adding react hot loading plus dev tool support.

Added as well a readme.md (feedback welcome on this document, is just barebones, we could add a lot of useful info here: e.g. links to hot loading, redux, dev tool, snapshots...).

TODO: I will open a new issue to proper create a dev configuration including react hot loading, but that's out of the scope for this case (a new case will be created).

Comment thread 18 ReactHotLoader/package.json Outdated
"redux-thunk": "^2.1.0",
"toastr": "^2.1.2"
"toastr": "^2.1.2",
"webpack-dev-server": "^1.14.1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move webpack-dev-server to devDependencies

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, pending commit / push

Comment thread 18 ReactHotLoader/webpack.config.js Outdated
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
loader: 'ts-loader'
loaders: ['react-hot', 'babel','ts-loader']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I test to execute the app without babel-loader and it's working. So we only need:

loaders: ['react-hot', 'ts-loader']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think webpack works if we configure this line like:

loaders: ['react-hot-loader', 'ts-loader']

or

loaders: ['react-hot', 'ts']

It's the same for it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points!!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,120 @@
# React Hot Loader + Redux dev tool support

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were writing this info in AboutPage, isn't it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the about page we can have a summary, but is a good idea to have detailed readme.md when a given user navigates to this sample in Github the readme.md will be automatically displayed

Comment thread 18 ReactHotLoader/package.json Outdated
"css-loader": "^0.23.1",
"deep-freeze": "0.0.1",
"enzyme": "^2.4.1",
"express": "^4.14.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove dependency

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants