PrimeReact with webpack setup

UI Components for React
Post Reply
yhrchan
Posts: 11
Joined: 03 Sep 2010, 17:40

16 Aug 2017, 20:37

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

Julienng
Posts: 2
Joined: 27 Aug 2014, 10:32

17 Aug 2017, 17:20

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

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

19 Aug 2017, 13:58

Are you facing the issue similar to this

https://github.com/primefaces/primereac ... t/issues/4
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

21 Aug 2017, 14:09

I also suggest create-react-app, it is awesome and handles all the complex webpack config for you via react-scripts.

vkoster
Posts: 2
Joined: 28 Sep 2017, 11:24

29 Sep 2017, 08:11

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

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests