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

[v2.0.3] Doesn't seem to pick up the babel presets. #78

Closed
aga5tya opened this issue Jan 11, 2018 · 6 comments
Closed

[v2.0.3] Doesn't seem to pick up the babel presets. #78

aga5tya opened this issue Jan 11, 2018 · 6 comments

Comments

@aga5tya
Copy link

aga5tya commented Jan 11, 2018

I bumped to latest koa-webpack version, did the necessary changes suggested in the update notes. But can't seem to succeed with the compilation step. Doesn't seem to pick up the babel config for react(jsx). Not sure what am i missing here, But I end up with the below error.

ERROR in ../src/index.js
Module parse failed: Unexpected token (27:2)
You may need an appropriate loader to handle this file type.
| 	const app = (
| 		<ReactHotLoader>
| 			<ReduxProvider store={store}>
@ multi react-hot-loader/patch regenerator-runtime/runtime ../src/index.js
ℹ 「wdm」: Failed to compile.

Is there a config change I'm missing out with changes around babel transpilation ? Will be happy to provide more information if needed. @shellscape

[Edit]
Works fine on the previous version. So I might be missing something here.

@shellscape
Copy link
Owner

@aga5tya thanks for the report. please fill in the issue template next time though, we ask that of everyone. the issue template has a section for // webpack.config.js and that's what we're gonna need to start to take a look at your issue.

@shellscape
Copy link
Owner

@JounQin side note: this is probably and indicator that we should precompile in webpack-hot-client. I really didn't want to go that route (dynamic babel compilation was supposed to eliminate more issues rather than cause them), but it looks like it's needed in this context.

@JounQin
Copy link
Contributor

JounQin commented Jan 11, 2018

Is there a runnable reproduction? Actually it runs very well in my own react project https://github.com/JounQin/react-hackernews .

@aga5tya
Copy link
Author

aga5tya commented Jan 12, 2018

@JounQin @shellscape Mine is loosely based on React-Universally koa boilerplate, Will try to repro with bare one and share the repo asap.

@aga5tya
Copy link
Author

aga5tya commented Jan 14, 2018

I'm unable to reproduce this with a bare version of react-universally. I'l dig deeper with the codebase I have and figure out where or what exactly I'm missing out on. Closing this until then.

@aga5tya aga5tya closed this as completed Jan 14, 2018
@shellscape
Copy link
Owner

@aga5tya you can try installing webpack-hot-client from this branch https://github.com/webpack-contrib/webpack-hot-client/tree/babel-client-dist with the app from your original post. if it works, please let me know

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

3 participants