Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"test": {
"plugins": [
"transform-class-properties",
"transform-object-assign"
"transform-object-assign",
"react-hot-loader/babel"
Copy link
Owner

Choose a reason for hiding this comment

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

Is this working? I think this only adds it if NODE_ENV=test

We might want to make a separate "development" property for the dev plugins like this one and see how that works

],
"presets": [
["env", {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .npm-packages-offline-cache/source-map-0.6.1.tgz
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions config/webpack/__snapshots__/browser_test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`webpack config matches snapshot 1`] = `
Object {
"entry": Object {
"bundle": Array [
"react-hot-loader/patch",
"sanitize.css/sanitize.css",
"tachyons-clears",
"tachyons-display",
Expand Down
1 change: 1 addition & 0 deletions config/webpack/blocks/getEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function getEntry (entry/* : ?(string | Object | Array<*>) */) {
return {
entry: {
bundle: [
'react-hot-loader/patch',
Copy link
Owner

Choose a reason for hiding this comment

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

it may not be as clean to do this here, but we should probably only add this if NODE_ENV === 'development'

'sanitize.css/sanitize.css',
'tachyons-clears',
'tachyons-display',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-helmet": "^5.2.0",
"react-hot-loader": "^3.0.0",
"react-native": "0.42.x",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
Expand Down
29 changes: 25 additions & 4 deletions src/index.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import InjectTapEventPlugin from 'react-tap-event-plugin'
import Rollbar from 'rollbar/dist/rollbar.umd.min'
import { Provider } from 'react-redux'
import { BrowserRouter as Router } from 'react-router-dom'
import { AppContainer } from 'react-hot-loader'
import configureStore from 'src/redux/store'
import { loadSuccess } from 'src/redux/modules/init'
import rollbarConfig from 'config/rollbar'
Expand Down Expand Up @@ -48,19 +49,39 @@ window.onload = () => {

}

ReactDOM.render(
const render = (Root: React$Element<*>) => {

ReactDOM.render(
<AppContainer>
{ Root }
</AppContainer>,
document.getElementById('react-mount')
)

}

const App = (
<Provider store={store}>
<MuiThemeProvider muiTheme={getMuiTheme()}>
<Router>
<Routes />
</Router>
</MuiThemeProvider>
</Provider>,

document.getElementById('react-mount')
</Provider>
)

render(App)

if (module.hot) {

module.hot.accept('src/routes', () => {

render(App)

})

}
Copy link
Owner

Choose a reason for hiding this comment

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

Did you try out the new relaxed arrow function lint rules?? ...we can now do this: 😉

if (module.hot) module.hot.accept('src/routes', () => render(App))


// Progressively apply ServiceWorker updates so browser can simply be refreshed
// to reflect changes with window.location.reload()
// TODO: Fire redux action
Expand Down
56 changes: 51 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0:
babylon "^6.17.2"
lodash "^4.2.0"

babel-template@^6.26.0:
babel-template@^6.26.0, babel-template@^6.7.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
dependencies:
Expand Down Expand Up @@ -3351,6 +3351,12 @@ error-stack-parser@1.3.3:
dependencies:
stackframe "^0.3.1"

error-stack-parser@^1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292"
dependencies:
stackframe "^0.3.1"

errorhandler@~1.4.2:
version "1.4.3"
resolved "https://registry.yarnpkg.com/errorhandler/-/errorhandler-1.4.3.tgz#b7b70ed8f359e9db88092f2d20c0f831420ad83f"
Expand Down Expand Up @@ -8238,6 +8244,10 @@ react-deep-force-update@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.1.tgz#bcd31478027b64b3339f108921ab520b4313dc2c"

react-deep-force-update@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.1.1.tgz#8ea4263cd6455a050b37445b3f08fd839d86e909"

react-dom@^15.6.1:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730"
Expand Down Expand Up @@ -8265,6 +8275,17 @@ react-helmet@^5.2.0:
prop-types "^15.5.4"
react-side-effect "^1.1.0"

react-hot-loader@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-3.0.0.tgz#6e28da9d459da8085f5ee8bdd775046ba4b5cd0b"
dependencies:
babel-template "^6.7.0"
global "^4.3.0"
react-deep-force-update "^2.1.1"
react-proxy "^3.0.0-alpha.0"
redbox-react "^1.3.6"
source-map "^0.6.1"

react-native@0.42.x:
version "0.42.3"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.42.3.tgz#450c8a03a5e3e991a08a426f22776dd8feb80b26"
Expand Down Expand Up @@ -8352,6 +8373,12 @@ react-proxy@^1.1.7:
lodash "^4.6.1"
react-deep-force-update "^1.0.0"

react-proxy@^3.0.0-alpha.0:
version "3.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-3.0.0-alpha.1.tgz#4400426bcfa80caa6724c7755695315209fa4b07"
dependencies:
lodash "^4.6.1"

react-redux@^5.0.6:
version "5.0.6"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946"
Expand Down Expand Up @@ -8555,6 +8582,15 @@ recompose@0.24.0:
hoist-non-react-statics "^1.0.0"
symbol-observable "^1.0.4"

redbox-react@^1.3.6:
version "1.5.0"
resolved "https://registry.yarnpkg.com/redbox-react/-/redbox-react-1.5.0.tgz#04dab11557d26651bf3562a67c22ace56c5d3967"
dependencies:
error-stack-parser "^1.3.6"
object-assign "^4.0.1"
prop-types "^15.5.4"
sourcemapped-stacktrace "^1.1.6"

redeyed@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a"
Expand Down Expand Up @@ -9549,26 +9585,36 @@ source-map-support@^0.4.2:
dependencies:
source-map "^0.5.6"

source-map@0.5.6, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"

source-map@^0.4.4, source-map@~0.4.1:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
dependencies:
amdefine ">=0.0.4"

source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
version "0.5.6"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"

source-map@^0.5.7:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"

source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"

source-map@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
dependencies:
amdefine ">=0.0.4"

sourcemapped-stacktrace@^1.1.6:
version "1.1.7"
resolved "https://registry.yarnpkg.com/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.7.tgz#17e05374ff78b71a9d89ad3975a49f22725ba935"
dependencies:
source-map "0.5.6"

sparkles@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
Expand Down