Socket
Socket
Sign inDemoInstall

@tfso/react-scripts-webcomponent

Package Overview
Dependencies
50
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tfso/react-scripts-webcomponent

Configuration and scripts for Create React App.


Version published
Maintainers
4
Install size
209 MB
Created

Readme

Source

react-scripts

This package includes scripts and configuration used by Create React App.
Please refer to its documentation:

  • Getting Started – How to create a new app.
  • User Guide – How to develop apps bootstrapped with Create React App.

TFSO-MODIFIED: Web component

This version of create-react-app it setup for creating web components.

See template/public/index.html for polyfills you'll need.

Installation: create-react-app --scripts-version=@tfso/react-scripts-webcomponent

Changes:

  • Build is modified to produce a single javascript file with everything included (styles, runtime, etc). Source maps are not included.
  • During css preprocessing, all styles are prepended with the :host tag.
  • During runtime, the styles are loaded, and all :host tags are replaced by the name of the web component. The styles are then mounted in style tags inside the web component.
  • We only use custom elements, not shadow dom. This is because shadow dom polyfills are pretty bad. Also, many react component packages rely on getting events from specific dom elements, which doesn't work when shadow dom retargets events to look like they come from the web component instead.
  • IE11 polyfills included by default
  • Styled components included by default

FAQs

Last updated on 30 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc