advanced-react-scripts
CRA & great features without ejecting
Last updated a year ago by artemir .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install advanced-react-scripts 
SYNC missed versions from official npm registry.

???? Advanced react-scripts

npm version

This repository is fork of react-scripts with fresh dependency packages and simple webpack modifications that can toggle extra features

???? Features

  • SASS / Stylus

  • CSS Modules / SASS Modules / Stylus Modules

  • Proposal Decorators (i)

  • Proposal Class Properties (i)

  • Babel Preset Stage 0 (i)

  • Customizable CSS Modules Local Ident Name

  • SVG Loader (makes sprite) (why) (i)

  • Additional bundle attribute (async|defer|...) (i)

  • Font Loader (ttf|eot|woff|woff2) (i)

❔ How to use it

  1. If you have existing project created by create-react-app, you can remove default react-scripts

    For it, run command:

    npm uninstall --save react-scripts or yarn uninstall react-scripts

  2. Next we need install advanced-react-scripts:

    npm install --save-dev advanced-react-scripts or yarn add advanced-react-scripts

  3. Then create .env file in the root of project for add any of the configuration options below to enable necessary feature

???? Configuration Options

Styling

Preprocessors

Feature Parameter in .env Type At default
SASS REACT_APP_SASS Boolean FALSE
Stylus REACT_APP_STYLUS Boolean FALSE

CSS Modules

Feature Parameter in .env Need file format Type At default
CSS Modules REACT_APP_CSS_MODULES [name].module.css Boolean FALSE
SASS Modules REACT_APP_SASS_MODULES [name].module.(sass/scss) Boolean FALSE
Stylus Modules REACT_APP_STYLUS_MODULES [name].module.styl Boolean FALSE

CSS Modules local ident name

Build Type Parameter in .env Type At default
Development REACT_APP_DEVELOPMENT_CSS_MODULES_IDENT_NAME String [path]__[name]___[local]
Production REACT_APP_PRODUCTION_CSS_MODULES_IDENT_NAME String [local]-[sha512:hash:base32]

Fonts

Build Type Parameter in .env Type At default
Font Loader REACT_APP_FONT_LOADER Boolean FALSE
<summary>Example</summary>
@font-face {
    font-family: 'Open Sans';
    src: local('Open Sans'),
         local('Open-Sans'),
         url('./../resources/fonts/OpenSans.woff2') format('woff2');
}

Experimental ES features

Presets

Feature Parameter in .env Type At default
Babel Preset Stage-0 REACT_APP_BABEL_PRESET_STAGE_0 Boolean FALSE

Single plugins

Feature Parameter in .env Type At default
Proposal Decorators REACT_APP_PROPOSAL_DECORATORS Boolean FALSE
Proposal Class Properties REACT_APP_PROPOSAL_CLASS_PROPERTIES Boolean FALSE

Specific loaders

GraphQL

Feature Parameter in .env Type At default
GraphQL Loader REACT_APP_GRAPHQL_LOADER Boolean FALSE

Official documentation

SVG

Feature Parameter in .env Type At default
SVG Loader (sprite) REACT_APP_SVG_SPRITE_LOADER Boolean FALSE
<summary>Example</summary>
import twitterIcon from '../assets/twitter.svg';

console.log(twitterIcon); // output 'sprite-[hash].svg#twitter-usage'

<svg>
  <use xlinkHref={twitterIcon}></use>
</svg>

Bundle tweaks

Feature Parameter in .env Type At default
Bundle Attribute REACT_APP_BUNDLE_ATTRIBUTE String null

NOTE: works only on production build

Future

We follow updates of original react-scripts and changes in used packages

We need help us, community! Everyone can take part in the development and suggest the idea, explained in Issue or make your own changes and send in PR. We have no strict rules for your issues. Any wishes are taken into account =)

Changelog

Current Tags

  • 0.3.50-rc.1                                ...           latest (a year ago)
  • 0.3.51-alfa.1                                ...           test (a year ago)

108 Versions

  • 0.3.51-alfa.1                                ...           a year ago
  • 0.3.51-alfa.0                                ...           a year ago
  • 0.3.50-rc.1                                ...           a year ago
  • 0.3.50-alfa.10                                ...           a year ago
  • 0.3.50-alfa.9                                ...           a year ago
  • 0.3.50-alfa.8                                ...           a year ago
  • 0.3.50-alfa.7                                ...           a year ago
  • 0.3.50-alfa.6                                ...           a year ago
  • 0.3.50-alfa.5                                ...           a year ago
  • 0.3.50-rc.0                                ...           a year ago
  • 0.3.50-alfa.4                                ...           a year ago
  • 0.3.50-beta.0                                ...           a year ago
  • 0.3.50-alfa.3                                ...           a year ago
  • 0.3.50-alfa.2                                ...           a year ago
  • 0.3.50-alfa.1                                ...           a year ago
  • 0.3.50-alfa.0                                ...           a year ago
  • 0.3.49-beta.0                                ...           a year ago
  • 0.3.49-alfa.0                                ...           a year ago
  • 0.3.48-beta.9                                ...           a year ago
  • 0.3.48-beta.8                                ...           a year ago
  • 0.3.48-beta.7                                ...           a year ago
  • 0.3.48-beta.6                                ...           a year ago
  • 0.3.48-beta.5                                ...           a year ago
  • 0.3.48-beta.4                                ...           a year ago
  • 0.3.48-beta.3                                ...           a year ago
  • 0.3.48-beta.2                                ...           a year ago
  • 0.3.48-beta.1                                ...           a year ago
  • 0.3.48-release.1                                ...           a year ago
  • 0.3.48-release.0                                ...           a year ago
  • 0.3.48-beta.0                                ...           a year ago
  • 0.3.47-beta.12                                ...           a year ago
  • 0.3.47-release.1                                ...           a year ago
  • 0.3.47-beta.11                                ...           a year ago
  • 0.3.47-beta.10                                ...           a year ago
  • 0.3.47-beta.9                                ...           a year ago
  • 0.3.47-beta.8                                ...           a year ago
  • 0.3.47-beta.7                                ...           a year ago
  • 0.3.47-beta.6                                ...           a year ago
  • 0.3.47-beta.5                                ...           a year ago
  • 0.3.47-beta.4                                ...           a year ago
  • 0.3.47-beta.3                                ...           a year ago
  • 0.3.47-beta.2                                ...           a year ago
  • 0.3.47-beta.1                                ...           a year ago
  • 0.3.47-beta.0                                ...           a year ago
  • 0.3.46-release.4                                ...           a year ago
  • 0.3.46-release.3                                ...           a year ago
  • 0.3.46-release.2                                ...           a year ago
  • 0.3.46-release.1                                ...           a year ago
  • 0.3.46-beta.10                                ...           a year ago
  • 0.3.46-release.0                                ...           a year ago
  • 0.3.46-beta.2                                ...           a year ago
  • 0.3.46-beta.1                                ...           a year ago
  • 0.3.46-beta.0                                ...           a year ago
  • 0.3.45-beta.3                                ...           a year ago
  • 0.3.45-beta.2                                ...           a year ago
  • 0.3.45-beta.1                                ...           a year ago
  • 0.3.44-beta.3                                ...           a year ago
  • 0.3.44-beta.8                                ...           a year ago
  • 0.3.44-beta.7                                ...           a year ago
  • 0.3.44-beta.6                                ...           a year ago
  • 0.3.44-beta.5                                ...           a year ago
  • 0.3.44-beta.4                                ...           a year ago
  • 0.3.44-beta.2                                ...           a year ago
  • 0.3.44-beta.1                                ...           a year ago
  • 0.3.44-beta.0                                ...           a year ago
  • 0.3.44                                ...           a year ago
  • 0.3.42                                ...           a year ago
  • 0.3.41                                ...           a year ago
  • 0.3.4                                ...           a year ago
  • 0.3.31                                ...           a year ago
  • 0.3.31-alfa.1                                ...           a year ago
  • 0.3.30                                ...           a year ago
  • 0.3.30-alfa                                ...           a year ago
  • 0.3.29-alfa                                ...           a year ago
  • 0.3.28-alfa                                ...           a year ago
  • 0.3.27-alfa                                ...           a year ago
  • 0.3.26-alfa                                ...           a year ago
  • 0.3.25-alfa                                ...           a year ago
  • 0.3.24-alfa                                ...           a year ago
  • 0.3.23                                ...           a year ago
  • 0.3.22                                ...           a year ago
  • 0.3.21                                ...           a year ago
  • 0.3.20                                ...           a year ago
  • 0.3.19                                ...           a year ago
  • 0.3.18                                ...           a year ago
  • 0.3.17                                ...           a year ago
  • 0.3.16                                ...           a year ago
  • 0.3.15                                ...           a year ago
  • 0.3.13                                ...           a year ago
  • 0.3.12                                ...           a year ago
  • 0.3.11                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.9                                ...           a year ago
  • 0.2.8                                ...           a year ago
  • 0.2.7                                ...           a year ago
  • 0.2.6                                ...           a year ago
  • 0.2.5                                ...           a year ago
  • 0.2.4                                ...           a year ago
  • 0.2.3                                ...           a year ago
  • 0.2.2                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 108
Dependencies (62)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |