Skip to content

Magento 2 module with webpack workflow to add a React component

License

Notifications You must be signed in to change notification settings

rossmc/ReactComponent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ReactComponent

Magento 2 module with webpack workflow to add a React component to Magento's frontent.

Features

  • Babel
  • CSS Modules
  • CSS Autoprefixing
  • PostCSS
  • Image Support with url-loader
  • UglifyJs

Installation

  • Download this repository into your magento instance, in an app/code directory.
  • Run php bin/magento module:enable Rossmc/ReactComponent
  • Run php bin/magento cache:flush
  • Run php bin/magento setup:upgrade

Ussage

  • cd into Rossmc/ReactComponent/view/frontend
  • run npm install
  • Develop your compnent in Rossmc/ReactComponent/view/frontend/src
  • Run npm start from
  • Place the React component whereever you wish with Layout XML as demonstrated in Rossmc/ReactComponent/view/frontend/layout/default.xml
  • Clear Magento caches and check Magento frontend for your React component.

About

Magento 2 module with webpack workflow to add a React component

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published