Disclaimer: I don't recommend to use this code for production widgets, this is was made for testing purpose
This project was bootstrapped with Create React App.
The purpose of this repository is to have a simple boilerplate to create web-components using React.
At the moment we cover some basics needs:
- Full encapsulated CSS via the shadow-dom
- Build a single bundle in order of make the distribution easier.
- Use react-shadow-dom-retarget-events package to be able of use React events.
- Typescript 🚀
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Same as yarn build
but it generates an unique bundle file (build/static/js/bundle.js
) in order to make the distribution of the web component more easy.