@basementscripts/react-override

0.1.0 • Public • Published

@basementscripts/react-override

This project overrides the default react-script implementation to allow for custom environment variables without the REACT_APP prefix and custom path aliases. This project is meant to work with Typescript.

Available Scripts

In the project directory, you can run:

yarn start

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.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

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.

Files

env.yml

After install, this file will be located in the root of your project directory.
Edit this file to define your explicit environment variables and default values. With this configuration, a simplified environment specific .env can modify any values.

tsconfig.base.json

Define you path aliases here. This will allow your to remove relative pathing for absolute pathing.

{
  "paths": {
    "@app": ["src"]
  }
}

Then with your imports you can

// this
import App from "../../App";
// becomes
import App from "@app/App";

Readme

Keywords

none

Package Sidebar

Install

npm i @basementscripts/react-override

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

50.7 kB

Total Files

10

Last publish

Collaborators

  • basementscripts-devops
  • justinandersonca