jaredpalmer / razzle

✨ Create server-rendered universal JavaScript applications with no configuration
https://razzlejs.org
MIT License
11.1k stars 866 forks source link

convert create-react-app to razzle #856

Open egaleme opened 5 years ago

egaleme commented 5 years ago

can i convert my create-react-app to a razzle app

Evanion commented 5 years ago

well the bulk of the application should just be copy paste ... You might have to refactor some stuff like state manager (redux, mobx) to initiate differently in server and client. But the main internals should be just copy/paste.

If you are using LocalStorage to handle auth tokens, I would recommend refactoring it to use cookies as LocalStorage doesn't work with SSR.

jaredpalmer commented 5 years ago

I should write a post on this. It’s fairly straight forward. although we do need to catch up to some of the newest CRA features like .gql and compiling node_modules

Evanion commented 5 years ago

@jaredpalmer I have a PR (#841) in relation to .gql files open.

egaleme commented 5 years ago

Thanks for your reply. i have serious headache using nextjs. Most of the libraries i used in my create react app just kept throwing errors with nextjs.

egaleme commented 5 years ago

hi, i'm having issues of syntax error trying to use this package react-images-upload with razzlejs.

egaleme commented 5 years ago

please i'm having this error when using react-images-upload with razzle. what do i do?

C:\Projects\razzlejs-projects\test-app\node_modules\react-images-upload\UploadIcon.svg:1 (function (exports, require, module, filename, dirname) { <line fill="none" stroke="#4D4D4D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit

SyntaxError: Unexpected token < at new Script (vm.js:79:7) at createScript (vm.js:251:10) at Object.runInThisContext (vm.js:303:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18)

cseas commented 4 years ago

@jaredpalmer Any update on the blog post for this? :)

ghost commented 3 years ago

@jaredpalmer can you please write a post about migrating CRA to Razzle?

ahmed-jawad828 commented 3 years ago

I should write a post on this. It’s fairly straight forward. although we do need to catch up to some of the newest CRA features like .gql and compiling node_modules

Sir, any update about the migration guide?

kirtirajsinh commented 2 years ago

Can I just add razzle in my create-react-app repo? I don't wanna migrate or change something. If yes Can you suggest some repo which has already done it.