Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starter project does not work with JS disable #1

Open
lmatshoba opened this issue Jan 6, 2016 · 5 comments
Open

Starter project does not work with JS disable #1

lmatshoba opened this issue Jan 6, 2016 · 5 comments

Comments

@lmatshoba
Copy link

If I turn of JS on my browser nothing loads in the starter app, if I do the same with the original react readux universal everything keeps working, not sure if I am missing something?

@bdefore
Copy link
Owner

bdefore commented Jan 6, 2016

thanks for noting this @lmatshoba ... this was due to a regression recently in 2.x and has been fixed as of 2.2.4. i've updated the starter.

note that when running locally with JS off, styles will not render. this is because the webpack-isomorphic-tools does not know of the assets when in development mode. when running universal-redux-server in production (with a build made with universal-redux-build) the assets will be available and will render serverside and you should see things correctly even with JS disabled.

@halt-hammerzeit this is the workaround to the style issue locally, used in react-redux-universal-hot-example: https://github.com/erikras/react-redux-universal-hot-example/blob/master/src/helpers/Html.js#L48 ... is this still what you recommend to do? would using ExtractTextPlugin in development alleviate the issue?

@catamphetamine
Copy link

@bdefore Hello.

this is because the webpack-isomorphic-tools does not know of the assets when in development mode

I didn't understand what you meant there. It should know of everything everytime

is this still what you recommend to do?

This is how I do in my project.
Your ways are not obliged to mimic mine.
If ExtractTextPlugin provides hot module reload (like styles do) then they're identical.

@bdefore
Copy link
Owner

bdefore commented Jan 6, 2016

@halt-hammerzeit The fault is not the webpack-isomorphic-tools but that the webpack-assets.json that's generated includes no styles in development with this webpack configuration. I'd like to explore a way to make that possible without adding too much complexity. I've created an issue for it here: bdefore/universal-redux#37

@catamphetamine
Copy link

@bdefore oh, i see.

@marr
Copy link

marr commented Jan 22, 2016

Not sure if its related but the react-redux-starter-kit has a fix in place which uses ExtractTextPlugin to bundle css in non-dev mode, due to the publicPath being set to the dev server in dev:

https://github.com/davezuko/react-redux-starter-kit/blob/master/build/webpack.config.js#L214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants