Add babel-preset-stage-3 to solve the module not found errors

Since this repo relies on Node >=v7.6, adding "babel-preset-stage-3": "^6.24.1", to package.json and "stage-3" to .babelrc, should solve this. I'd be happy to make this change in Pull Request. Do I need access rights to the repo for that?

Fork, then branch for the fix, then PR to this master

Got it. Thanks. Will do.
Tim
On October 11, 2017 at 1:08:28 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Fork, then branch for the fix, then PR to this master
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335879892,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDBbsGAMC5zMJusSYZAoSAc4ZoOvUks5srPYLgaJpZM4P1ziX
.

Do you know when these changes usually hit NPM?
TIm
On October 11, 2017 at 1:09:13 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it. Thanks. Will do.
Tim
On October 11, 2017 at 1:08:28 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Fork, then branch for the fix, then PR to this master
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335879892,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDBbsGAMC5zMJusSYZAoSAc4ZoOvUks5srPYLgaJpZM4P1ziX
.

I'll make a release in the next hour
On Wed, Oct 11, 2017 at 11:42 AM Tim Khalif<EMAIL_ADDRESS>wrote:

Do you know when these changes usually hit NPM?
TIm
On October 11, 2017 at 1:09:13 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it. Thanks. Will do.
Tim
On October 11, 2017 at 1:08:28 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Fork, then branch for the fix, then PR to this master
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335879892,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDBbsGAMC5zMJusSYZAoSAc4ZoOvUks5srPYLgaJpZM4P1ziX

.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335908267,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCaXitiSIVdaRuGFp2XLVWyT9ndvHks5srQwBgaJpZM4P1ziX
.

Awesome. Thanks!
On October 11, 2017 at 2:43:00 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
I'll make a release in the next hour
On Wed, Oct 11, 2017 at 11:42 AM Tim Khalif<EMAIL_ADDRESS>wrote:

Do you know when these changes usually hit NPM?
TIm
On October 11, 2017 at 1:09:13 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it. Thanks. Will do.
Tim
On October 11, 2017 at 1:08:28 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Fork, then branch for the fix, then PR to this master
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335879892,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBbsGAMC5zMJusSYZAoSAc4ZoOvUks5srPYLgaJpZM4P1ziX

.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335908267,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCaXitiSIVdaRuGFp2XLVWyT9ndvHks5srQwBgaJpZM4P1ziX
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335908534,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDOTvFyrc66UugzD9K2JdrAdAeJWEks5srQw0gaJpZM4P1ziX
.

Sorry. Still trying to get to this. Hang tight
On Wed, Oct 11, 2017 at 11:43 AM Tim Khalif<EMAIL_ADDRESS>wrote:

Awesome. Thanks!
On October 11, 2017 at 2:43:00 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll make a release in the next hour
On Wed, Oct 11, 2017 at 11:42 AM Tim Khalif<EMAIL_ADDRESS>wrote:

Do you know when these changes usually hit NPM?
TIm
On October 11, 2017 at 1:09:13 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it. Thanks. Will do.
Tim
On October 11, 2017 at 1:08:28 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Fork, then branch for the fix, then PR to this master
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335879892
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBbsGAMC5zMJusSYZAoSAc4ZoOvUks5srPYLgaJpZM4P1ziX

.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335908267
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCaXitiSIVdaRuGFp2XLVWyT9ndvHks5srQwBgaJpZM4P1ziX

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335908534,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDOTvFyrc66UugzD9K2JdrAdAeJWEks5srQw0gaJpZM4P1ziX

.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335908736,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCaCD_mrZuQ4SQB9ka8fgzMCZXnZPks5srQxdgaJpZM4P1ziX
.

Released :)

Still having the same bugs. Looks like the after uninstalling react-static
-g and reinstalling it -g, then using "react-static create FooBar".
FooBar’s node_modules/react-static is still missing babel stage-3 flags in
package.json and .babelrc.
On October 11, 2017 at 7:14:29 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Released :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335974895,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDAQNclhYqR7S6WKdSn-3GdLRAn78ks5srUvTgaJpZM4P1ziX
.

Try the latest release. Apparently I needed to use 1.x.x in the examples instead of ^1.x.x

Works!

Fixed. However, there might be another issue. Not sure if this is a bug or
not. Right now, after you run yarn build, and disable Javascript in your
browser (I use Safari for this because it’s faster to disable JS in it),
you don’t see any content in the Home component “http:localhost:3000/“.
That would mean that the build process is not considering anything static?
return [
{
path: '/',
component: 'src/containers/Home',
},
{
path: '/about',
component: 'src/containers/About',
},
{
path: '/blog',
component: 'src/containers/Blog',
getProps: () => ({
posts,
}),
I thought that this should just pass the Home component as it is (hard
coded html) and renderToString that?
Tim
On October 11, 2017 at 7:53:13 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Try the latest release. Apparently I needed to use 1.x.x in the examples
instead of ^1.x.x
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335980782,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDLkkpwm0x-peerYQIV430URZ3REzks5srVTogaJpZM4P1ziX
.

Found a bug in the getStaticProps component. Fixed and released :)

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX
.

You can put your provider in app. Just make sure you only create the store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX
.

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX
.

Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX
.

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)

// Hot Module Replacement
if (module.hot) {
    module.hot.accept('./App', () => {
        render(require('./App').default)
    })
}

}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX
.

Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX
.

Got it.
OK, one more question. If you wanted your Blog component to only load JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995729,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX
.

Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995729,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX
.

Sorry to bombard you with emails, but I realized that the dist folder could
only function for dev or prod, not both at the same time. So when you run
yarn serve, it will serve only the dev files. You have to run build or
serve. Why not make dev_dist and prod_dist, or dev and dist folders? Just
an idea.
Tim
On October 11, 2017 at 9:54:21 PM, Timur K<EMAIL_ADDRESS>wrote:
Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store. You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995729,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX
.

The react static routes file is not used at run time. It is only used to
build the bundle at build time. The idea is for the dist folder to serve as
the temporary directory for serving dev and the destination directory for
builds.
On Wed, Oct 11, 2017 at 6:57 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Sorry to bombard you with emails, but I realized that the dist folder could
only function for dev or prod, not both at the same time. So when you run
yarn serve, it will serve only the dev files. You have to run build or
serve. Why not make dev_dist and prod_dist, or dev and dist folders? Just
an idea.
Tim
On October 11, 2017 at 9:54:21 PM, Timur K<EMAIL_ADDRESS>wrote:
Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store.
You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335995213
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335995593
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335995729,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335997884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCQw9vWdSxJewoF6Z05iBE9ZAts7yks5srXIggaJpZM4P1ziX
.

If you want to use different data at run time. You can just query it in
component did mount or some other browser only lifecycle location, then use
that in place of the static props.
On Wed, Oct 11, 2017 at 8:09 PM Tanner Linsley<EMAIL_ADDRESS>wrote:

The react static routes file is not used at run time. It is only used to
build the bundle at build time. The idea is for the dist folder to serve as
the temporary directory for serving dev and the destination directory for
builds.
On Wed, Oct 11, 2017 at 6:57 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Sorry to bombard you with emails, but I realized that the dist folder
could
only function for dev or prod, not both at the same time. So when you run
yarn serve, it will serve only the dev files. You have to run build or
serve. Why not make dev_dist and prod_dist, or dev and dist folders? Just
an idea.
Tim
On October 11, 2017 at 9:54:21 PM, Timur K<EMAIL_ADDRESS>wrote:
Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store.
You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213>,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593>,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335995729

,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-335997884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCQw9vWdSxJewoF6Z05iBE9ZAts7yks5srXIggaJpZM4P1ziX
.

Fair enough.
This brings up an interesting point. I would like to avoid having to manage
a server and just serve the files on CDN. Ideally as the static routes are
hit by crawlers, they will read some data that might or might not be stale,
depending on when you ran the build. With the CDN scenario, this data might
be more stale than if the whole thing was served by a server, because, how
often will you run build and upload to CDN? Of course you could automate
that, etc. But that’s OK. When the actual users hit the site, and most of
them have Javascript enabled, all is well, and the components could fetch
data and prevent any staleness. I guess it’s more of a SEO decision, than a
technical one. But it aligns well with the kinds of problems react-static
solves, I think.
Tim
On October 11, 2017 at 11:12:24 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
If you want to use different data at run time. You can just query it in
component did mount or some other browser only lifecycle location, then use
that in place of the static props.
On Wed, Oct 11, 2017 at 8:09 PM Tanner Linsley<EMAIL_ADDRESS>wrote:

The react static routes file is not used at run time. It is only used to
build the bundle at build time. The idea is for the dist folder to serve
as
the temporary directory for serving dev and the destination directory for
builds.
On Wed, Oct 11, 2017 at 6:57 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Sorry to bombard you with emails, but I realized that the dist folder
could
only function for dev or prod, not both at the same time. So when you run
yarn serve, it will serve only the dev files. You have to run build or
serve. Why not make dev_dist and prod_dist, or dev and dist folders? Just
an idea.
Tim
On October 11, 2017 at 9:54:21 PM, Timur K<EMAIL_ADDRESS>wrote:
Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load
JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store.
You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335984571
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335987884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213>,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593>,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335995729

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-335997884
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCQw9vWdSxJewoF6Z05iBE9ZAts7yks5srXIggaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-336008652,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDH0lHkRgKEaczy2yeUuO7lYhEkMaks5srYOXgaJpZM4P1ziX
.

Agreed. The key is that you have options and are free to be as up to date
as you need to be. We use a headless CMS to trigger builds. This may not be
fast enough for some so you can always pull fresh data at runtime.
On Wed, Oct 11, 2017 at 8:19 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Fair enough.
This brings up an interesting point. I would like to avoid having to manage
a server and just serve the files on CDN. Ideally as the static routes are
hit by crawlers, they will read some data that might or might not be stale,
depending on when you ran the build. With the CDN scenario, this data might
be more stale than if the whole thing was served by a server, because, how
often will you run build and upload to CDN? Of course you could automate
that, etc. But that’s OK. When the actual users hit the site, and most of
them have Javascript enabled, all is well, and the components could fetch
data and prevent any staleness. I guess it’s more of a SEO decision, than a
technical one. But it aligns well with the kinds of problems react-static
solves, I think.
Tim
On October 11, 2017 at 11:12:24 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
If you want to use different data at run time. You can just query it in
component did mount or some other browser only lifecycle location, then use
that in place of the static props.
On Wed, Oct 11, 2017 at 8:09 PM Tanner Linsley<EMAIL_ADDRESS>wrote:

The react static routes file is not used at run time. It is only used to
build the bundle at build time. The idea is for the dist folder to serve
as
the temporary directory for serving dev and the destination directory for
builds.
On Wed, Oct 11, 2017 at 6:57 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Sorry to bombard you with emails, but I realized that the dist folder
could
only function for dev or prod, not both at the same time. So when you
run
yarn serve, it will serve only the dev files. You have to run build or
serve. Why not make dev_dist and prod_dist, or dev and dist folders?
Just
an idea.
Tim
On October 11, 2017 at 9:54:21 PM, Timur K<EMAIL_ADDRESS>wrote:
Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load
JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create the
store
one time in index.js so hot reloading won't clobber the redux store.
You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif <
<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released :)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-335984571

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-335987884

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995729

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335997884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCQw9vWdSxJewoF6Z05iBE9ZAts7yks5srXIggaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-336008652,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDH0lHkRgKEaczy2yeUuO7lYhEkMaks5srYOXgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-336009589,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCaFZF6BQn-VepkUCb_8tiOuMBiMEks5srYUygaJpZM4P1ziX
.

Hi Tanner,
I wanted to ask you if there’s a way to expose the webpack config file. Is
there an “eject” feature maybe?
Also, one was to use react-static in a Typescript project, I assume it
would work if the right tweaks were done to the webpack config file.
Thanks,
Tim
On October 12, 2017 at 1:12:32 AM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Agreed. The key is that you have options and are free to be as up to date
as you need to be. We use a headless CMS to trigger builds. This may not be
fast enough for some so you can always pull fresh data at runtime.
On Wed, Oct 11, 2017 at 8:19 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Fair enough.
This brings up an interesting point. I would like to avoid having to
manage
a server and just serve the files on CDN. Ideally as the static routes are
hit by crawlers, they will read some data that might or might not be
stale,
depending on when you ran the build. With the CDN scenario, this data
might
be more stale than if the whole thing was served by a server, because, how
often will you run build and upload to CDN? Of course you could automate
that, etc. But that’s OK. When the actual users hit the site, and most of
them have Javascript enabled, all is well, and the components could fetch
data and prevent any staleness. I guess it’s more of a SEO decision, than
a
technical one. But it aligns well with the kinds of problems react-static
solves, I think.
Tim
On October 11, 2017 at 11:12:24 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
If you want to use different data at run time. You can just query it in
component did mount or some other browser only lifecycle location, then
use
that in place of the static props.
On Wed, Oct 11, 2017 at 8:09 PM Tanner Linsley<EMAIL_ADDRESS>wrote:

The react static routes file is not used at run time. It is only used to
build the bundle at build time. The idea is for the dist folder to serve
as
the temporary directory for serving dev and the destination directory
for
builds.
On Wed, Oct 11, 2017 at 6:57 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Sorry to bombard you with emails, but I realized that the dist folder
could
only function for dev or prod, not both at the same time. So when you
run
yarn serve, it will serve only the dev files. You have to run build or
serve. Why not make dev_dist and prod_dist, or dev and dist folders?
Just
an idea.
Tim
On October 11, 2017 at 9:54:21 PM, Timur K<EMAIL_ADDRESS>wrote:
Another issue I noticed is that when running yarn build, the build
generates absolute paths in react-static-routes.js. This would make it
impossible to carry the dist folder to any CDN.
Tim
On October 11, 2017 at 9:46:38 PM, Timur K<EMAIL_ADDRESS>wrote:
Got it.
OK, one more question. If you wanted your Blog component to only load
JSON
when it’s static (that is, it’s being crawled) and when it’s hydrated
React, you want it to call an http service, how would you configure the
static.config.js, if at all possible?
Thanks,
Tim
On October 11, 2017 at 9:42:11 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yep. In the comp
On Wed, Oct 11, 2017 at 6:41 PM Tim Khalif<EMAIL_ADDRESS>wrote:

No sure I follow. Where would you pass the store here, in the Comp?
// Render your app
if (typeof document !== 'undefined') {
const render = Comp => {
ReactDOM.hydrate(

,
document.getElementById('root'),
)
}
// Render!
render(App)
// Hot Module Replacement
if (module.hot) {
module.hot.accept('./App', () => {
render(require('./App').default)
})
}
}
On October 11, 2017 at 9:38:34 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yes. And in the render function.
On Wed, Oct 11, 2017 at 6:08 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Pass the store as in
index.js:
export default
On October 11, 2017 at 9:04:44 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can put your provider in app. Just make sure you only create
the
store
one time in index.js so hot reloading won't clobber the redux
store.
You
could just pass the store down to your app as a prop.
On Wed, Oct 11, 2017 at 5:43 PM Tim Khalif <
<EMAIL_ADDRESS>wrote:

Confirmed. It works! Nice.
So for a Redux example, where would you wrap the app in ? Would it be in App?
export default () => (

Home
About
Blog

)
Tim
On October 11, 2017 at 8:18:50 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Found a bug in the getStaticProps component. Fixed and released
:)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-335984571

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDJBArwvRvzWTR1xctSPaqOIQEL5Eks5srVrpgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-335987884

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCSUGUGjpoExhXmF09radA1Y5QyYgks5srWCjgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335990760
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDOjF3BJdfGPkPKX1iIIzvRjNImKZks5srWWqgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335991254
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCc3S2j-4d8mR-bTY8IZl0i3hau3Pks5srWaPgaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995213
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDDadJ_XKaZVRHGQIKTkKWytacsO0ks5srW2agaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995593
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCW9l4e1tWOCvZkk8IvmjmbH13_hSks5srW47gaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335995729

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDO1T-T3YAwH12-_A4M8D9ivaB3jxks5srW5zgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-335997884
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCQw9vWdSxJewoF6Z05iBE9ZAts7yks5srXIggaJpZM4P1ziX

.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-336008652,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDH0lHkRgKEaczy2yeUuO7lYhEkMaks5srYOXgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-336009589,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCaFZF6BQn-VepkUCb_8tiOuMBiMEks5srYUygaJpZM4P1ziX
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-336022606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDFoW6FljacuozBM0eZGIGczigxc0ks5srZ-7gaJpZM4P1ziX
.

@Nembus, in the static.config.js, there is a webpack callback that uses webpack-configurator to allow for customization.
 // An optional callback, used to modify the webpack config for both dev
  // and production. The function you provide will be passed an instance of
  // webpack-configurator (see https://github.com/lewie9021/webpack-configurator
  // for more information), and an object containing a `dev` boolean, denoting
  // whether you are in development or production mode.
  webpack: (webpackConfigurator, { dev }) => {...},

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there is a
webpack callback that uses webpack-configurator to allow for customization.
// An optional callback, used to modify the webpack config for both dev
// and production. The function you provide will be passed an instance of
// webpack-configurator (see https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean, denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX
.

Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there is a
webpack callback that uses webpack-configurator to allow for customization.
// An optional callback, used to modify the webpack config for both dev
// and production. The function you provide will be passed an instance of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX
.

I’m not clear on whether I need to install webpack along with any library
or not. Let’s say, you want to add postcss. I would yarn add postcss and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both dev
// and production. The function you provide will be passed an instance of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX
.

Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any library
or not. Let’s say, you want to add postcss. I would yarn add postcss and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both dev
// and production. The function you provide will be passed an instance of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX
.

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any library
or not. Let’s say, you want to add postcss. I would yarn add postcss and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both dev
// and production. The function you provide will be passed an instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX
.

I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any library
or not. Let’s say, you want to add postcss. I would yarn add postcss and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both dev
// and production. The function you provide will be passed an instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX
.

That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both
dev
// and production. The function you provide will be passed an instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337111258,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX
.

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both
dev
// and production. The function you provide will be passed an instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337111258,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX
.

You can access the value through Router.subscribe. Is that what you're
talking about
On Fri, Oct 20, 2017 at 6:23 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss
and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both
dev
// and production. The function you provide will be passed an
instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337106631
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337109764
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337111258,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338350241,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCcs2rBK_cGnPL9eNUG9ldIurdNaRks5suTmcgaJpZM4P1ziX
.

I mean that ideally, I’d like to use only one loader/spinner per project:
either react-static or my own, because it would look weird to have to
spinners running in the app during async operations. Hopefully that makes
sense.
Tim
On October 20, 2017 at 8:31:26 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
You can access the value through Router.subscribe. Is that what you're
talking about
On Fri, Oct 20, 2017 at 6:23 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss
and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js, there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both
dev
// and production. The function you provide will be passed an
instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337056714
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337059093
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337106631
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337109764
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-337111258,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338350241,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCcs2rBK_cGnPL9eNUG9ldIurdNaRks5suTmcgaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338350917,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDMzzxJsbvzouZEwTi6FwYwpfuDp1ks5suTtegaJpZM4P1ziX
.

InitialLoading does not display in production. So you can use any spinner
you want throughout your app.
On Fri, Oct 20, 2017 at 6:34 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I mean that ideally, I’d like to use only one loader/spinner per project:
either react-static or my own, because it would look weird to have to
spinners running in the app during async operations. Hopefully that makes
sense.
Tim
On October 20, 2017 at 8:31:26 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can access the value through Router.subscribe. Is that what you're
talking about
On Fri, Oct 20, 2017 at 6:23 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss
and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>

wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js,
there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for both
dev
// and production. The function you provide will be passed an
instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337056714

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337059093

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337111258
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-338350241
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCcs2rBK_cGnPL9eNUG9ldIurdNaRks5suTmcgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338350917,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDMzzxJsbvzouZEwTi6FwYwpfuDp1ks5suTtegaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338351139,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCVTh1zcqUTBCzjvLdRPggRHcyAuNks5suTwDgaJpZM4P1ziX
.

Oh. So it’s only in Dev? Good to know.
Thanks,
Tim
On October 20, 2017 at 8:37:22 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
InitialLoading does not display in production. So you can use any spinner
you want throughout your app.
On Fri, Oct 20, 2017 at 6:34 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I mean that ideally, I’d like to use only one loader/spinner per project:
either react-static or my own, because it would look weird to have to
spinners running in the app during async operations. Hopefully that makes
sense.
Tim
On October 20, 2017 at 8:31:26 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can access the value through Router.subscribe. Is that what you're
talking about
On Fri, Oct 20, 2017 at 6:23 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any
examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss
and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>

wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js,
there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for
both
dev
// and production. The function you provide will be passed an
instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev
boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337056714

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337059093

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337111258
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-338350241
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCcs2rBK_cGnPL9eNUG9ldIurdNaRks5suTmcgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338350917,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDMzzxJsbvzouZEwTi6FwYwpfuDp1ks5suTtegaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338351139,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCVTh1zcqUTBCzjvLdRPggRHcyAuNks5suTwDgaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338351401,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDMS7EH0YsjBC2wgpz6lamrFJpi64ks5suTzAgaJpZM4P1ziX
.

I need to import* 'react-dates/lib/css/_datepicker.css’*, but that
requires adding css-loader in webpack, which I was not successful at doing
with the webpackconfiguration lib. Any thoughts as to how to get a
css-loader?
Thanks,
Tim
On October 20, 2017 at 8:38:14 PM, TIMUR K<EMAIL_ADDRESS>wrote:
Oh. So it’s only in Dev? Good to know.
Thanks,
Tim
On October 20, 2017 at 8:37:22 PM, Tanner Linsley<EMAIL_ADDRESS>wrote:
InitialLoading does not display in production. So you can use any spinner
you want throughout your app.
On Fri, Oct 20, 2017 at 6:34 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I mean that ideally, I’d like to use only one loader/spinner per project:
either react-static or my own, because it would look weird to have to
spinners running in the app during async operations. Hopefully that makes
sense.
Tim
On October 20, 2017 at 8:31:26 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can access the value through Router.subscribe. Is that what you're
talking about
On Fri, Oct 20, 2017 at 6:23 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any
examples
where you’re adding, say, postcss or sass support to react-static? I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add postcss
and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif<EMAIL_ADDRESS>

wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js,
there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for
both
dev
// and production. The function you provide will be passed an
instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev
boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337056714

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337059093

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337088894
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337102123
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-337111258
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDGlci9hRRaio5BCKnTybvc4ZOEiEks5stCZigaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/nozzle/react-static/issues/27#issuecomment-338350241
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCcs2rBK_cGnPL9eNUG9ldIurdNaRks5suTmcgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338350917,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDMzzxJsbvzouZEwTi6FwYwpfuDp1ks5suTtegaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338351139,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCVTh1zcqUTBCzjvLdRPggRHcyAuNks5suTwDgaJpZM4P1ziX
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/issues/27#issuecomment-338351401,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANiDMS7EH0YsjBC2wgpz6lamrFJpi64ks5suTzAgaJpZM4P1ziX
.

Refer to the basic example in static.config.js. A CSS loader can be
imported and used without any configuration needed.
On Fri, Oct 20, 2017 at 7:06 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I need to import* 'react-dates/lib/css/_datepicker.css’*, but that
requires adding css-loader in webpack, which I was not successful at doing
with the webpackconfiguration lib. Any thoughts as to how to get a
css-loader?
Thanks,
Tim
On October 20, 2017 at 8:38:14 PM, TIMUR K<EMAIL_ADDRESS>wrote:
Oh. So it’s only in Dev? Good to know.
Thanks,
Tim
On October 20, 2017 at 8:37:22 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
InitialLoading does not display in production. So you can use any spinner
you want throughout your app.
On Fri, Oct 20, 2017 at 6:34 PM Tim Khalif<EMAIL_ADDRESS>wrote:

I mean that ideally, I’d like to use only one loader/spinner per project:
either react-static or my own, because it would look weird to have to
spinners running in the app during async operations. Hopefully that makes
sense.
Tim
On October 20, 2017 at 8:31:26 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
You can access the value through Router.subscribe. Is that what you're
talking about
On Fri, Oct 20, 2017 at 6:23 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Hi,
Quick question about the loader/spinner (InitialLoading that’s in
react-static/src/index.js). Is there a way to expose it or make it play
nice with the app’s loaders? In other words, if I’m using a custom
loader/spinner, then a user could see both during the app’s lifecycle.
Thanks,
Tim
On October 17, 2017 at 12:02:37 AM, TIMUR K<EMAIL_ADDRESS>wrote:
That would be great, and could increase adoption, hopefully. I’m a good
guinea pig in this case.
Thanks,
Tim
On October 17, 2017 at 12:00:35 AM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
I'll work on some public examples
On Mon, Oct 16, 2017 at 9:48 PM Tim Khalif<EMAIL_ADDRESS>wrote:

Have you tried adding any loaders yourself? Or do you have any
examples
where you’re adding, say, postcss or sass support to react-static?
I’d
think that most people using react-static would be using some kind of
pre/post processor.
Thanks,
Tim
On October 16, 2017 at 11:23:58 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Yeah, that sounds like a webpack-configurator thing. I’m not
extremely
familiar with it, but it looks like you’re doing it right.
On Mon, Oct 16, 2017 at 8:50 PM Tim Khalif<EMAIL_ADDRESS>

wrote:

I’m not clear on whether I need to install webpack along with any
library
or not. Let’s say, you want to add postcss. I would yarn add
postcss
and
then:
export default {
webpack: (webpackConfigurator, {dev}) => {
webpackConfigurator.loader(“postcss-loader", {
test: /.css$/,
loader: "style-loader!postcss-loader"
});
and if I console.log the passed in webpackConfigurator, I see:
"_loaders": {
"css-loader": {
"config": {
"test": {},
"loader": "style-loader!postcss-loader"
}
}
Notice that the test regex is gone. This might be more of a
webpackConfigurator issue than react-static, but I’m asking in case
you’re
familiar with this.
Thanks,
Tim
On October 16, 2017 at 9:18:36 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
Correct!
On Mon, Oct 16, 2017 at 4:12 PM Tim Khalif <
<EMAIL_ADDRESS>

wrote:

I see. So do you make two entries, one for dev, and one for prod?
webpack: (webpackConfigurator, { dev }) => {…},
webpack: (webpackConfigurator, {}) => {...},
Thanks,
Tim
On October 16, 2017 at 6:01:39 PM, Tanner Linsley (
<EMAIL_ADDRESS>wrote:
@Nembus https://github.com/nembus, in the static.config.js,
there
is a
webpack callback that uses webpack-configurator to allow for
customization.
// An optional callback, used to modify the webpack config for
both
dev
// and production. The function you provide will be passed an
instance
of
// webpack-configurator (see
https://github.com/lewie9021/webpack-configurator
// for more information), and an object containing a dev
boolean,
denoting
// whether you are in development or production mode.
webpack: (webpackConfigurator, { dev }) => {...},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337056714

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDL5wsO80Ig-98PuNhfvW8s4MElNGks5ss9JAgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337059093

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCXoMVVPzqmUlh8Rc_jpYo8o2Fuadks5ss9TSgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337088894

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNNgZ6Hr3Tuc3IF_ari-al-hiag5ks5stABsgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<

https://github.com/nozzle/react-static/issues/27#issuecomment-337102123

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCYmXv4I8sYDhZat4jPSKNfJqUJMqks5stBXqgaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337106631
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDBUSm_rHAMWkHfvjjR7pKUvtjpLdks5stB3NgaJpZM4P1ziX

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<
https://github.com/nozzle/react-static/issues/27#issuecomment-337109764
,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AFUmCeIcZk2FMD7gVQpEiQnZM5z0JcDBks5stCOagaJpZM4P1ziX

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<