• Login
  • Register

DNN Forums

A community discussion page. We're starting from scratch, so...let's get the party started!

How to do a 'react' build?

You are not authorized to post a reply.
Sort:


New Member


Posts:7
New Member

    I want to debug an issue in the client side react code , How do I do a build so that my changes are transferred to my dev website? That is without doing ".\Build.ps1 -Target ResetDevSite"

    Must be something simpler...



    New Member


    Posts:10
    New Member

      It isn't unfortunately. So first thing to understand: the React code doesn't live in VS when you open the solution. VS is not the best tool for editing React javascript. VS Code, for instance, is much better. So open up your Git cloned DNN folder in VS Code and go to the Admin Experience folder and then ClientSide. That holds all the React code for the PersonaBar. Navigate to the react project of your choice, for instance the Site Settings (SiteSettings.Web). Open the package.json and check the projects "name" (site_settings).

      Now also open a shell/command prompt at the root of the git repo. And type in this code:

      
      yarn watch --scope site_settings
      


      This will fire up webpack and build this project and copy the result to where you've specified in the settings.local.json. If you don't know what that means please read the BUILD document in the repo documentation.

      Peter


      New Member


      Posts:7
      New Member

        Great, thanks, works as advertised.

        So webpack observes file changes, that is handy. Chrome complains that react hot module replacement is not available. I probably need a plugin Next I need to figure out how to do debugging...

        You are not authorized to post a reply.

        These Forums are dedicated to discussion of DNN Platform.

        For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

        1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
        2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
        3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
        4. No Flaming or Trolling.
        5. No Profanity, Racism, or Prejudice.
        6. Site Moderators have the final word on approving / removing a thread or post or comment.
        7. English language posting only, please.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved