Page 1 of 1

PrimeReact with webpack setup

Posted: 16 Aug 2017, 20:37
by yhrchan
Hello,

I am new to PrimeReact and React/Webpack in general. I've tried running https://github.com/primefaces/primereact-quickstart and it works. However, I can't seem to get webpack to work or it doesn't seem to apply the themes to my simple app. Would anyone have an example setup with webpack + primereact for reference?

Many thanks!
Ricky

Re: PrimeReact with webpack setup

Posted: 17 Aug 2017, 17:20
by Julienng
I recommend you to use "create-react-app" : https://github.com/facebookincubator/create-react-app

It does everything you need to start and hide all the boilerplate / work related about building the app (webpack here). If you want to see the webpack configuration or need to edit it, you can do

Code: Select all

npm run eject
in your project.

So basically, start with create-react-app and if you need more, eject your project

Re: PrimeReact with webpack setup

Posted: 19 Aug 2017, 13:58
by sudheer
Are you facing the issue similar to this

https://github.com/primefaces/primereac ... t/issues/4

Re: PrimeReact with webpack setup

Posted: 21 Aug 2017, 14:09
by cagatay.civici
I also suggest create-react-app, it is awesome and handles all the complex webpack config for you via react-scripts.

Re: PrimeReact with webpack setup

Posted: 29 Sep 2017, 08:11
by vkoster
Hi Ricky,
is this still an issue?
I had problems loading styles, especially Font-Awesome stuff, when importing with webpack.
It turned out to be problem of relative path being wrong for url- and file-loader.
This post on stackoverload https://stackoverflow.com/questions/341 ... ding-fonts helped me through.
Please consider Will Madden's solution.

br volker