Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Preact-Compat not working on Babel-register #390

Closed
abarcenas29 opened this issue May 26, 2017 · 1 comment
Closed

Preact-Compat not working on Babel-register #390

abarcenas29 opened this issue May 26, 2017 · 1 comment

Comments

@abarcenas29
Copy link

abarcenas29 commented May 26, 2017

I am trying to setup an server rending react using react-router-4. While it works just fine on the front-end side (Webpack). It appears that preact-compat is not working when used in the server side. I am using babel-register so transpile the code.

image

I have a branch here for reference:
https://github.com/abarcenas29/preact-sandbox-v0/tree/wip/isomorphic-react

to run:
yarn run install
yarn run start:prod

go to localhost:3100

@developit
Copy link
Member

Babel does not transpile your dependencies in node_modules, so using babel-register to alias is not a workable way to alias in preact-compat. You should use a module like module-alias. There is a complete explanation of how to use that module here:
#299 (comment)

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

No branches or pull requests

2 participants